Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Bar Graph Questions


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Bar Graph Questions
Date   Wed, 15 Sep 2004 10:58:54 +0100

Dasovic, Josip
 
> I have tried searching the appropriate places for help with 
> bar graphs, but have come up empty-handed.  I hope that list 
> members may be able to help me with two questions regarding 
> bar graphs.
>  
> 1)  I am creating a series of bar graphs of monthly numbers 
> of deaths spanning almost ten years.  I get exactly what I 
> want, except for the labels on the x (i.e. categorical) axis. 
>  Stata, logically, keeps all the labels.  I would like to 
> keep a subset of the labels (e.g. Jan1991, August 1991, 
> Jan1992, etc.) and haven't been able to find a way to do 
> this.  I have tried to remove the non-needed labels (i.e., 
> Feb1991, March1991, etc.) from the variable itself and then 
> create the graph, but to no avail.  Any hints?

I guess you are using -graph bar- or -graph hbar-. 
As far as Stata is concerned, you got exactly 
what you asked for, as it assumes that all levels of a categorical 
variable are of interest and should be labelled. The usual 
work-around is to rephrase the problem as one for -twoway bar-, 
which will give you the control you want. 

> 2) One of the columns is of a magnitude greater than the 
> other columns.  (While most columns values vary from 0 to 50, 
> in one month the value is over 500).  How do I fix the yscale 
> so that it is appropriate (i.e., goes from 0 to 60, say, and 
> place one of those fancy breaks in the one column that is 
> much larger than the others?

This has been discussed on the list before. In essence, official 
Stata does not support "fancy breaks". At this point, the users 
divide into "Jolly good thing too" and "What a pity" parties. 
Apart from solutions such as plotting on a square root scale, 
you could fabricate a line by methods similar to those 
described in 
http://www.stata.com/support/faqs/graphics/scbreak.html
but I doubt that it will be fancy enough to satisfy. 

Nick 
[email protected] 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index