Dear Stata Users,
I have a question as to option for labeling bars. When I graph bar charts of grouped data (percents of different activity of three business types), I want to add a label on each bar. However, there are some zero percent in my data, and the -blabel()- option will display them as same as non-zero values. And my question is how to hide zero percents in corresponding bars.
I have a question as to option for labeling bars. When I graph bar charts of grouped data (percents of different activity of three business types), I want to add a label on each bar. However, there are some zero percent in my data, and the -blabel()- option will display them as same as non-zero values. And my question is how to hide zero percents in corresponding bars.
Code:
graph bar v2 v3 v4 v5, over(v1) stack blabel(bar, format(%9.1f) posi(center)) nofill legend(row(1) order(1 "None" 2 "One" 3 "Two" 4 "Three"))
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str9 v1 float(v2 v3 v4 v5) "business1" 31.47 68.53 0 0 "business2" 67.33 29.53 3.13 0 "business3" 78.93 7.4 13.2 .47 end
Comment