How about replacing the 0 values with "." for the cases where the variable
has no values.
Example
. sysuse auto
(1978 Automobile Data)
. qui tab rep, gen(D)
. replace D1 = . if fore == 1
(21 real changes made, 21 to missing)
. replace D2 = . if fore == 1
(21 real changes made, 21 to missing)
. graph bar D* , stack percent over(fore) blabel(bar,pos(center))
Hope this helps,
Scott
----- Original Message -----
From: "Friedrich Huebler" <[email protected]>
To: <[email protected]>
Sent: Saturday, April 03, 2004 4:39 PM
Subject: st: Bar labels in stacked bar chart
> Is it possible to prevent the drawing of selected bar labels in a
> stacked bar chart? Take a look at this example:
>
> . sysuse auto, clear
> . xi: graph bar i.rep78, stack percent over(foreign) blabel(bar,
> pos(center))
>
> The bar for "Foreign" has no cases with rep78=2 and therefore a 0 is
> drawn at the bottom of the bar. Can the drawing of this 0 be
> prevented? I found no solution in the manual or in the Statalist
> archive.
>
> Thank you for your help.
>
> Friedrich Huebler
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Small Business $15K Web Design Giveaway
> http://promotions.yahoo.com/design_giveaway/
> *
> * For searches and help try:
> * http://www.stata.com/support/faqs/res/findit.html
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/