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, is already up and running.

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

Re: st: Blabel in stacked Bars with empty categories

From   Nick Cox <>
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-.


On Tue, Apr 12, 2011 at 5:11 PM, Rilke Rainer Michael
<> 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:

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