Bookmark and Share

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Adding a text box on top of bars in bar graph


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Adding a text box on top of bars in bar graph
Date   Sat, 25 Jun 2011 07:00:58 +0100

You would be better off with -graph bar- -- and even better off with
-graph hbar- or -graph dot-, I guess to show those country names well.

Here is a dopey example to show some technique:

sysuse auto, clear
sort mpg
keep in 1/15
graph hbar (asis) turn trunk, over(make) over(foreign) nofill

Nick

On Fri, Jun 24, 2011 at 9:35 PM, ajjee <ajjee1@yahoo.com> wrote

> I've a dataset for 15 countries over 2 years. These 15 countries belong to 3
> groups. I've made a bar chart using the following command:
>
> twoway bar  yr1998 yr1999, by(country)
>
>  But here I want that there should appear a box over the bars for countries:
> 1 to 5 ("Group1"), for 2 to 10 ("Group2") and for 11 to 15 ("Group3").
>
> I have tried to insert text box using stata graph edit tools but this box
> appears over one or two countries and not over the whole group of countries.

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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index