Announcement

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

  • Labels not showing on y-axis, catplot

    Dear all,

    I am using the catplot command, and want the labels to show on the y-axis. For some reason these labels won't show in the browse mode window, but appear in the "Manage variable label" window, so it seems like they have been applied. The code I have used is straight forward:
    Code:
    label define var 1 "Hospitalized", modify
    label define var 0 "Not hospitalized", modify
    When I use catplot the y-axis is labeled "0" and "1" instead of "Hospitalized" and "Not hospitalized". I cannot edit this manually in the Graph Editor either. The code I have used is

    Code:
    catplot Intervensjon month  var, percent(month Intervensjon) ///
    asyvars bar(1, ) bar(2, color(eltgreen) )  ///
    note("note")  legend(off) ///
    ytitle("Percent")
    Does anyone know why the labels are not showing in the browse mode window? Is there another way to label the y-axis using the catplot command?

    Thanks,
    Lillian

  • #2
    catplot is from SSC.

    Please show a data example.

    https://www.statalist.org/forums/help#stata explains both points.

    Comment


    • #3
      Dear Nick,

      I actually figured it out, but will provide a data example next time. For me labeling the variable before I used the command "reshape long" for panel data made it work, for some reason.

      Thanks anyway,
      Lillian

      Comment

      Working...
      X