Announcement

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

  • Changing titles on side-by-side bar graphs

    Hi All,

    I'm trying to create a side-by-side bar graph, as per below (note dummy variable labels included- the dataset is confidential):

    Code:
    graph bar (count) if time>6, by(deceased_end, note("")) over(nut_ax_sga_rating) over(time, label(labsize(small)))   ///
        ytitle("Y axis", size(small)) b1title("X axis", size(small)) graphregion(color(white))  ///
        legend(order(1 "A" 2 "B" 3 "C") size(small))  ///
        asyvars
    Which provides me with the following graph:

    Click image for larger version

Name:	bar_help.png
Views:	2
Size:	45.7 KB
ID:	1612023

    How do I relabel the "No" and "Yes" at the top of each graph to something else? These are the labels from the binary variable (coded 0/1, labelled No/Yes), but surely there's another way than relabeling the variable to change these title/headings?

    Cheers,

    Marissa
    Attached Files

  • #2
    relabeling the variable deceased_end is the easiest way to do that.
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment

    Working...
    X