[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
Finne H�kon <[email protected]> |

To |
<[email protected]> |

Subject |
st: RE: Bar Graph Questions |

Date |
Wed, 15 Sep 2004 11:49:20 +0200 |

```
Josip,
here are a couple of hints.
1)
a. Make sure your months are numerical and either interpreted or labeled as dates. See [U] chapter 27.
b. This allows you to use -graph twoway bar- , which is for a numerical x, rather than -graph bar-, which is for a categorical x.
c. Then you should be able to use the -xlabel(lowest(interval)highest)- option to determine which months to label. You may have to fiddle around with the starting value to get it right. See [G] graph twoway area for some hints.
2)
When you are using -graph twoway-, you can overlay two plots, using the notation
-graph twoway (bar olddeath month, plot_options) (bar newdeath month, plot_options), graph_options-
(or the || notation). Make sure the olddeath data only go up to your chosen cutoff point and make a newdeath variable dealing with the tallest columns. Then fiddle around with appropriate ways of scaling the two y axes. Add some adornment to make the cutoff visible. See [G] graph twoway bar (p. 244) for some ideas to get you started.
-- H�kon
hakon.finneintef.no
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dasovic, Josip
Sent: 15. september 2004 08:30
To: [email protected]
Subject: st: Bar Graph Questions
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?
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?
Thanks,
Josip
*
* 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/
*
* 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/
```

- Prev by Date:
**st: RE: reshape long does not recognize negative date values** - Next by Date:
**st: RE: option diparm** - Previous by thread:
**st: RE: reshape long does not recognize negative date values** - Next by thread:
**st: RE: Bar Graph Questions** - Index(es):

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