Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 73157

Adding an extra bar to an hbar graph

$
0
0
Dear all,

I am using stata 17 and have produced an hbar graph with the following code:

graph hbar, over(nonwhite) over(season, relabel(1 "Season 16/17" 2 "Season 17/18" 3 "Season 18/19" 4 "Season 19/20" 5 "Season 20/21")) blabel(bar, format(%2.1f) size(vsmall)) asyvars bargap(10) graphregion(color(white)) percentages bar(1, col(navy%40)) bar(2, col(navy%80)) name(nonwhite_S, replace) title("Skin color shares over seasons", position(12) span ring(7) size(small)) ylabel(20 40 60 80) ytitle("percent") graphregion(color(white)) legend(col(2) label(1 "White players") label(2 "Nonwhite players") symxsize(3))

I would like to add additional bars (for the nonwhite dummy) over all five seasons to the graph. Is this possible?

I would appreciate any help!

Kind regards,

Eric

Viewing all articles
Browse latest Browse all 73157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>