Hi Statalists,
I am trying to produce the attached graph, but with the barlabels in the center of each bar category, instead of on top.
If I use the command bellow, I get the following two notes:
The data used is as follows:
Note that my scheme is set to "s2color", and my font (if it matters) to "Avenir-Light".
How do I get the barlabels to be in the middle of each bar category?
Thanks so much.
Rob
I am trying to produce the attached graph, but with the barlabels in the center of each bar category, instead of on top.
If I use the command bellow, I get the following two notes:
- (note: named style Center not found in class barlabelpos, default attributes used)
- (note: barlabelpos not found in scheme, default attributes used)
Code:
graph bar (asis) low moderate high, /// over(threshold) asyvars percentages stack /// bar(1, color(green)) /// bar(2, color(orange)) /// bar(3, color(red)) /// legend(order(1 "Low risk" 2 "Moderate risk" 3 "High risk") rows(1)) graphregion(margin(zero) fcolor(white) lcolor(none) lwidth(none) ifcolor(white) ilcolor(none) ilwidth(none)) plotregion(lcolor(none%0) lwidth(none) ilcolor(none%0) ilwidth(none)) blabel(bar, position(Center) format(%3.1f) justification(center) alignment(middle)) name(lapses, replace)
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str3 threshold float(low moderate high) "500" 147 32 7 "475" 133 34 19 "450" 118 35 33 "425" 92 37 57 "400" 71 44 71 "375" 28 31 127 "355" 18 14 154 end
How do I get the barlabels to be in the middle of each bar category?
Thanks so much.
Rob
Comment