Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

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


From   Dorothy Bridges <[email protected]>
To   [email protected]
Subject   Re: st: AW: How to avoid duplicate labels in a stacked bar graph?
Date   Fri, 19 Feb 2010 09:25:40 -0500

Thanks, Martin.  The only problem is that in my actual data I really
need the labels to be blabels, because there are both positive and
negative values -- i.e., there is no effective vertical axis along
which to place the group names.

Thanks again,
Dorothy

On Fri, Feb 19, 2010 at 9:11 AM, Martin Weiss <[email protected]> wrote:
>
> <>
>
> Here is a kludge:
>
>
> *************
> sysuse auto, clear
>
> keep price make
> expand 2
> bys make: gen period=_n
> bys make: replace price=price+1000 if _n==2
>
> graph hbar (mean) price, over(period)  /*
> */ over(make, label(labsize(tiny)))  /*
> */ asyvars stack legend(off)
> *************
>
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Dorothy Bridges
> Gesendet: Freitag, 19. Februar 2010 15:02
> An: [email protected]
> Betreff: st: How to avoid duplicate labels in a stacked bar graph?
>
> 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/
>
>
> *
> *   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/
>

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index