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: Blabel in stacked Bars with empty categories
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: Blabel in stacked Bars with empty categories
Date
Tue, 12 Apr 2011 17:34:08 +0100
I think this won't happen if you change all the 0s to missings,
temporarily or on clones of these variables. -graph bar- certainly
ignores missings.
Use -mvdecode-.
Nick
On Tue, Apr 12, 2011 at 5:11 PM, Rilke Rainer Michael
<[email protected]> wrote:
> Hello,
>
> i am working on a bar-chart over 5 different groups of my dataset. In
> every group 5 different variables are possible. See here my code for
> the bar-chart.
>
> graph bar a b c d e, /*
> */ blabel(name, pos(center) size(medium)) nolabel /*
> */ bar(1, color(gs16) lcolor(black)) bar(2, color(gs16) lcolor(black))
> bar(3, color(gs16) lcolor(black)) bar(4, color(gs16) lcolor(black))
> bar(5, color(gs16) lcolor(black)) /*
> */ ytitle("Fraction") /*
> */ note(" Note") /*
> */ stack over(Group, gap(50)) outergap(200) scheme(s1mono)
>
> the problem is that some of the variables a to e have a value of 0 in
> some groups. Nevertheless stata shows the label of this empty
> categories. Is there a way of hide these labels via the code? Or do I
> have to erase these specific labels via the graph editor (which would
> be a mess since I want to produce more than two graphs of this kind.
*
* 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/