I'm creating bar graphs with similar code:
graph bar var1 var2 var3 var4, ///
over(race, relabel (1 "race1" 2 "race2" 3 "race3" 4 "race4" 5 "race5")) ///
stack ///
graphregion(color(white)) ///
title("Average Number of Things", color(black)) ///
subtitle("Subgroup", color(black)) ///
ytitle("# of Things") ///
ylabel(0(.5)2,nogrid) ///
legend(label (1 "Type 1") ///
label (2 "Type 2") ///
label (3 "Type 3") ///
label (4 "Type 4")) ///
bar(1, bcolor(navy)) ///
bar(2, bcolor(ebblue)) ///
bar(3, bcolor(eltblue)) ///
bar(4, bcolor(ebg)) ///
blabel(total, format(%4.1f))
var1+var2+var3+var4 = total of interest
I'd like each bar to be labeled with the total of var1+var2+var3+var4 but not any of the lesser cumulative totals. Is there any way to do this using graphing options that I can write into a .do file? I can delete all the lesser cumulative totals produced with the above code using the graphing editor, but I'd really like to be able to automate that.
Thank you!
Related Posts with bar graph / blabel()
Average Net Migration RateHi all. Good Morning. This is my first post here, but I have been consulting you, thank you for your…
Marginsplot, legend and by()Dear Stata Users, I am producing a graph with marginsplot throug the following commands and options…
Linear regression model, volatility measure, stock return predictabilityHi, Statalist! I am writing a thesis on the stock market predictability, using a linear regression…
Bar Graph - Highlight Specific BarArray I have generated the above graph using the following code : Code: graph bar, over(region) bl…
composing two different summary statistics tables with one dataset.Hello again, I'm working on a project on which I have to analyse VC-backed ICOs with non-VC-backed …
Subscribe to:
Post Comments (Atom)
0 Response to bar graph / blabel()
Post a Comment