[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: -graph bar, over()- question and bug report
How can I emphasize some of the groups in a -graph bar, over()-
graph? I have graphs similar to one produced with these commands:
. sysuse uslifeexp
. drop if year>1910
. graph bar le_w le_b, over(year) stack
Let's assume I want to emphasize the years 1902 to 1905. As far as I
know, none of the following ideas can be implemented in Stata.
- Draw the labels for 1902 to 1905 in a different color. This idea is
my personal favorite but -relabel(# "text")- has no option for
specifying the color of the text.
- Add a horizontal line from 1902 to 1905 (horizontal y lines cross
the entire graph).
- Add two vertical lines, one to the left of 1902 and one to the
right of 1905 (vertical lines cannot be added).
I would appreciate any suggestions for adding emphasis to the years
1902 to 1905.
Now to the bug report. I thought about creating a vertical line with
the letters I or l but this leads to an error message.
. graph bar le_w le_b, over(year) stack text(2 18 "I" 2 55 "I")
The same error message appears when the letters i, j, or l are used.
That resulting graph has only the bars without any labels. I did not
test the entire alphabet but most other letters appear to work. I can
create a vertical line with the character used to indicate "or" in
Stata commands but I would rather not use the -text- option because
the correct coordinates depend on things like legend position and
size that are not fixed.
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
* For searches and help try: