Announcement

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

  • Create new xlabel in graph bar

    Hi everyone, I use the following code to generate the bar graph for the mean of each variable. However, I would like to lablel the first bar as "1" and label the second bar as "3". The number shows up in the bottom of the bar on xaxis. I do not use the command "over()". How can I do this? Thank you.

    [/CODE]
    sysuse auto,clear

    graph bar (mean) weight length
    [/CODE]


    Click image for larger version

Name:	Graph.png
Views:	1
Size:	29.7 KB
ID:	1688842


  • #2
    When I use your code, I get a legend.

    Code:
    graph bar (mean) weight length, yvaroptions(relabel(1 "1" 2 "3"))

    Comment


    • #3
      Originally posted by Nick Cox View Post
      When I use your code, I get a legend.

      Code:
      graph bar (mean) weight length, yvaroptions(relabel(1 "1" 2 "3"))
      Yes, sorry. I forgot to put "legend(off)" in my code above. Thanks a lot.

      Comment

      Working...
      X