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]

st: Blabel in stacked Bars with empty categories

From   "Rilke Rainer Michael" <>
To   <>
Subject   st: Blabel in stacked Bars with empty categories
Date   Tue, 12 Apr 2011 18:11:38 +0200


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.

I would appreciate any comment.

Kind Regards,

*   For searches and help try:

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