I am using Stata 13.1.
I have some graphs that I am creating. One thing I am having difficulty with is how to insert a text label (using a string variable) underneath each of the bars that the twoway command produces. The current commands work as I would expect, including sorting the graph by the variable "n", but would like to have a label underneath each. There are 56 unique bars in the graph.
Thank you for your input.
Donny
I have some graphs that I am creating. One thing I am having difficulty with is how to insert a text label (using a string variable) underneath each of the bars that the twoway command produces. The current commands work as I would expect, including sorting the graph by the variable "n", but would like to have a label underneath each. There are 56 unique bars in the graph.
Thank you for your input.
Donny
Code:
capture drop n capture drop trbc_prcnt sort trbc_centername gen n=_n graph twoway (bar trbc_centername n if region_label==1, fcolor(red) lcolor(red)) (bar trbc_centername n if region_label==2, fcolor(blue) lcolor(blue)) (bar trbc_centername n if region_label==4, fcolor(green) lcolor(green)) (bar trbc_centername n if region_label==5, fcolor(chocolate) lcolor(chocolate)), ylabel(0(20)100, angle(horizontal)) ytitle(Transfusions Rate) xtitle(Medical Center) title("Intra or Post-op Transfusion Rates" "by Medical Center" "AVR+/-CABG Surgery") note("Last 100 Cases Across IMPROVE Network Medical Centers") legend(off)
Comment