Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • graph dot (horizontal dot chart) for some lines the dotted line markers are missing

    In a dot chart (stata 16) I want one dot per line. Two colours of dots should signal a distinct binary caracter. Lines should be labelled in two hierarchical levels.
    The example below illustrates that in my solution the dotted lines are missing for one of the two types of dots.
    A horizontal dot chart is convenient for my application because it saves space: I want to display 44 values (analogous to "make") belonging to 12 groups (analogous to "foreign") with value and group labels of up to 10 characters each: all in one page. By the colours I want to distinguish statistically significant from non-significant point estimates.
    Code:
    sysuse auto
    keep in 40/60   // just to reduce the number of lines to be displayed
    sort foreign
    separate price, by(price>5000)
    graph dot price0 price1, over(make) over(foreign) nofill
    I 'd be grateful for a hint,
    Stephan

  • #2
    This works:

    Code:
    sysuse auto, clear
    keep in 40/60   // just to reduce the number of lines to be displayed
    sort foreign
    separate price, by(price > 5000)
    graph dot price0 price1 price, marker(3, ms(none)) over(make) over(foreign)  nofill  legend(order(1 2))
    This is by observation rather than by understanding. The lines drawn seem to corresponding to non-missing values of the last named outcome variables.

    That being so, feed price to the graph but switch off the markers.

    Comment


    • #3
      Dear Nick, thanks a lot for your quick and helpful advice! It works also in my bigger application. Your "observation" includes good intuition regarding where to observe ;-) Best regards, Stephan

      Comment

      Working...
      X