Hello list,
I am aware this has been covered, I would just like discuss to bring this topic up to date.
When using (1) graph bar stacked option with multiple overs(), in order to sort by multiple groups (<= 3), it has been made clear that (2) twoway rbar is inefficient in (or incapable of) creating this graphic in the same way as (1). The difference between the two is clear, and (1) is preferred to (2) for simplicity when using multiple overs(). I have only found one major lacking feature of (1), and that is the blabel() option. Has there been any progress in generating a blabel() feature to label total observations used? Or even better, a third external variable (e.g. "N")?
So far the options are:
1) Use graph editor and manually insert text (incredibly cumbersome and slow, especially when graphs are constantly evolving)
2) twoway rbar which is much more involved, and potentially not even able to create the same desired outcome
For completeness I'll include some code, but I believe it is clear without.
e.g.
#delimit ;
graph bar ARRA_Spending Non_ARRA_Spending, over(PY) over(Program_Year, relabel(1 "Pre-ARRA" 2 "ARRA" 3 "Post-ARRA")) nofill stack
ytitle("Funding Source (Mil. USD)")
legend(label(1 "ARRA Expenditures") label(2 "Non-ARRA Expenditures"))
blabel(bar, position(inside) format(%9.1f) color(white))
blabel(TOTAL, position(outside) format(%9.1f));
#delimit cr
Where "TOTAL" would ideally be the total observations, count, or even a third variable "N".
Thank you for your thoughts on this!
- Bryan
I am aware this has been covered, I would just like discuss to bring this topic up to date.
When using (1) graph bar stacked option with multiple overs(), in order to sort by multiple groups (<= 3), it has been made clear that (2) twoway rbar is inefficient in (or incapable of) creating this graphic in the same way as (1). The difference between the two is clear, and (1) is preferred to (2) for simplicity when using multiple overs(). I have only found one major lacking feature of (1), and that is the blabel() option. Has there been any progress in generating a blabel() feature to label total observations used? Or even better, a third external variable (e.g. "N")?
So far the options are:
1) Use graph editor and manually insert text (incredibly cumbersome and slow, especially when graphs are constantly evolving)
2) twoway rbar which is much more involved, and potentially not even able to create the same desired outcome
For completeness I'll include some code, but I believe it is clear without.
e.g.
#delimit ;
graph bar ARRA_Spending Non_ARRA_Spending, over(PY) over(Program_Year, relabel(1 "Pre-ARRA" 2 "ARRA" 3 "Post-ARRA")) nofill stack
ytitle("Funding Source (Mil. USD)")
legend(label(1 "ARRA Expenditures") label(2 "Non-ARRA Expenditures"))
blabel(bar, position(inside) format(%9.1f) color(white))
blabel(TOTAL, position(outside) format(%9.1f));
#delimit cr
Where "TOTAL" would ideally be the total observations, count, or even a third variable "N".
Thank you for your thoughts on this!
- Bryan
Comment