Announcement

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

  • How to slim the bar in a bar graph

    Hi Collective,

    I have a rather simple question. I was trying to organize a panel of bar graphs. For the sake of aesthetics, I would like to slim one of the bars so that it has the same size as the others in the panel. I tried searching the net and Stata documentation but no luck.

    I show a snippet of my code below.

    Thanks,

    graph bar mu1 , over(morb1a)
    ysc(r(0 1))
    blabel(bar, position(inside) format(%9.3f) color(white))
    ytitle(" ")
    title("HS")

  • #2
    If you make the gaps bigger, then the bars become smaller.

    This example is reproducible. The suboption gap() is documented: go to the help for graph bar and click on over_subopts

    Code:
    sysuse auto, clear
    graph hbar (mean) mpg , over(rep78)
    graph hbar (mean) mpg , over(rep78, gap(*2))
    graph hbar (mean) mpg , over(rep78, gap(*20))

    Comment


    • #3
      Perfect, thank you!

      Comment

      Working...
      X