[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Bar chart and time series
Stata 8.2, Windows XP
I would like to create a bar chart that compares country data over
time but am not sure how to do this. Take this example:
. sysuse educ99gdp, clear
. graph bar public private, over(country)
The graph shows 1999 data. Now assume that I have 2004 data that I
want to add to the graph. Assume further that all 2004 values are
higher than the 1999 values.
. gen public04 = 1.2*public
. gen private04 = 1.2*private
One possibility would be to add the 2004-1999 difference on top of
the existing bars, in a stacked bar chart. Another possibility would
be to add points or other symbols above the "public" and "private"
bars that indicate the 2004 value. I don't know how to do either in
Stata and so far I managed only to create a graph that has too many
. graph bar public public04 private private04, over(country)
I studied the Graphics manual and Michael Mitchell's "A visual guide
to Stata graphics" but found no other solution. Dot plots are not an
option because I have to follow certain guidelines. Thank you for
your suggestions on how the data could be presented.
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
* For searches and help try: