Hello,
I am making a hbar plot that has shows the percentage of counts across 7 different variables (e.g. vfh_3mo_level_0, vfh_3mo_level_1, etc) that have values of either "1" or missing ("."), over a variable that has two groups to which patients were assigned to. The resulting plot is excellent, however, the blabel option results in 0's in between certain stacked bars (please see plot).
Can you advise how I can remove these 0's in the bar labels?
Thank you!
Here is the resulting plot:

I am making a hbar plot that has shows the percentage of counts across 7 different variables (e.g. vfh_3mo_level_0, vfh_3mo_level_1, etc) that have values of either "1" or missing ("."), over a variable that has two groups to which patients were assigned to. The resulting plot is excellent, however, the blabel option results in 0's in between certain stacked bars (please see plot).
Can you advise how I can remove these 0's in the bar labels?
Thank you!
Code:
graph hbar (count) /// vfh_3mo_level_0 /// vfh_3mo_level_1 /// vfh_3mo_level_2 /// vfh_3mo_level_3 /// vfh_3mo_level_4 /// vfh_3mo_level_11 /// vfh_3mo_level_14 /// , stack percent /// over(group) asyvars /// nofill graphregion(color(white)) /// legend(order( /// 1 "A" /// 2 "B" /// 3 "C" /// 4 "D" /// 5 "E" /// 6 "F" /// 7 "G" )) /// blabel(bar, color(white) position(center) format(%2.0f)) /// ytitle("Percentage") /// bar(1, fcolor(red*0.1) lwidth(none)) /// bar(2, fcolor(red*0.5) lwidth(none)) /// bar(3, fcolor(red*1.0) lwidth(none)) /// bar(4, fcolor(red*1.5) lwidth(none)) /// bar(5, fcolor(red*2) lwidth(none)) /// bar(6, fcolor(red*2.5) lwidth(none)) /// bar(7, fcolor(red*8) lwidth(none))
Comment