Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.

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

 From Nick Cox To statalist@hsphsun2.harvard.edu Subject Re: st: How to start a bar graph with a minimum other than 0 Date Wed, 31 Aug 2011 15:42:33 +0100

```So, it sounds as though you should not start at 50.

What is the range of means to be plotted on the y axis?

On Wed, Aug 31, 2011 at 3:35 PM, Andrew Hsiao <ahsiao@newvisions.org> wrote:
> Unfortunately if I use ylabel(50(10)100), it only labels the top part of the y axis.
>
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
> Sent: Wednesday, August 31, 2011 10:25 AM
> To: statalist@hsphsun2.harvard.edu
> 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 <ahsiao@newvisions.org> 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/
>

*
*   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/
```