Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

# RE: st: How to start a bar graph with a minimum other than 0

 From Andrew Hsiao <[email protected]> To "[email protected]" <[email protected]> Subject RE: st: How to start a bar graph with a minimum other than 0 Date Wed, 31 Aug 2011 10:35:14 -0400

```Unfortunately if I use ylabel(50(10)100), it only labels the top part of the y axis.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Nick Cox
Sent: Wednesday, August 31, 2011 10:25 AM
To: [email protected]
Subject: Re: st: How to start a bar graph with a minimum other than 0

My guess: Your -ylabel()- option insists on a label at 0. Stata is

Nick

On Wed, Aug 31, 2011 at 3:24 PM, Andrew Hsiao <[email protected]> wrote:
> Hi!
>
> I was trying to create a bar graph with a set of group means. The differences between the groups are not big numerically but I'd like to highlight the differences. I want to  plot the bars at a value other than 0 (not meant to mislead but to make the point of where they differ).
>
> I thought yscale(range(50 100)) would do the trick but it doesn't. Even including exclude0 has no effect. Is Stata trying to keep me honest? Or am I missing something?
>
> Thanks for anyone who would shed the light.
>
> Andrew
>
> ============================================================================= the syntax I used:
>
> graph bar (mean) atdpct1011sep (mean) atdpct1011oct (mean) atdpct1011nov (mean) atdpct1011dec (mean) atdpct1011jan ///
>        (mean) atdpct1011feb (mean) atdpct1011mar (mean) atdpct1011apr (mean) atdpct1011may (mean) atdpct1011jun ///
>        if bucket != "Transfer", title(2010-2011 Monthly Average Attendance) ytitle(Average Monthly Attendance) note(* transfer schools not included) ///
>        bar(1, fcolor(ltkhaki) lcolor(gs10)) bar(2, fcolor(gs15) lcolor(gs10)) bar(3, fcolor(gs15) lcolor(gs10)) bar(4, fcolor(gs15) lcolor(gs10)) ///
>        bar(5, fcolor(gs15) lcolor(gs10)) bar(6, fcolor(gs15) lcolor(gs10)) bar(7, fcolor(gs15) lcolor(gs10)) bar(8, fcolor(gs15) lcolor(gs10)) ///
>        bar(9, fcolor(gs15) lcolor(gs10)) bar(10, fcolor(gs15) lcolor(gs10)) ///
>        bargap(10) yscale(range(50 100)) ylabel(0(10)100) legend(off) showyvars ///
>        yvaroptions(relabel(1"Sep" 2 "Oct" 3 "Nov" 4 "Dec" 5 "Jan" 6 "Feb" 7 "Mar" 8 "Apr" 9 "May" 10 "Jun")label(angle(45))) ///
>        by(, title(2010-2011 Monthly Attendance) note(* Transfer schools not included; based on monthly ATS RIAS reports)) exclude0
>

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```

• Follow-Ups: