I want to create an histogram representing the percentages corresponding to each one of three-category variable by country. The name of the categorical variable is rel_ed in the code below.
want the bars stacked and... each bar to be accompanied by its corresponding percentage.
I have tried with catplot and graph bar. See next
Code:
catplot rel_ed country3, percent(country3) asyvars stack recast(bar)
Code:
graph bar, over(rel_ed) over(country3) percentage asyvars stack
Array
But I am not able to include an option that would allow me to attach a percentage to each corresponding bar. This is precisely what I would like to do.
Do you happen to know if there is any option with catplot or graph bar that would allow to do so?
Many thanks for your attention
Luis Ortiz
0 Response to Adding percentages to bars in an histogram
Post a Comment