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 on April 23, and its replacement, statalist.org is already up and running.


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

st: How to avoid duplicate labels in a stacked bar graph?


From   Dorothy Bridges <dbstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: How to avoid duplicate labels in a stacked bar graph?
Date   Fri, 19 Feb 2010 09:01:50 -0500

Dear Statalist,

I would like to avoid the problem replicated in the following code:

***

sysuse auto, clear

rename price price1
gen price2=price1+1000
reshape long price, i(make) j(period)

#delimit;
graph hbar price,
over(period, label(nolabels)) over(make, label(nolabels))
asyvars stack
blabel(group)
legend(off)
xsize(4) ysize(8)
;


***

In other words, I would like the name of the make of each car to
appear only once in the stacked bar graph.  I cannot find anything
about this in the listserve archives or help files.  Thanks so much in
advance for your thoughts --

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