Hi all,
Consider a simplified data description: I have ethnicity variable with categories: 1=black, 2=white, 3=asian. I want to plot ethnicity against a categorical variable (CAT) which has following categories: 1=low,2=med-low,3=med-high,4=high.
To do this, I generated ethnic dummies and computed their shares and confidence intervals by CAT and now want to use twoway bar to plot them.
A simplified code is below:
But only the plot for the final category, i.e asian appears on the graph. I'm not sure how to place all the bars together in the same graph.
Would appreciate any help!
Best,
Consider a simplified data description: I have ethnicity variable with categories: 1=black, 2=white, 3=asian. I want to plot ethnicity against a categorical variable (CAT) which has following categories: 1=low,2=med-low,3=med-high,4=high.
To do this, I generated ethnic dummies and computed their shares and confidence intervals by CAT and now want to use twoway bar to plot them.
A simplified code is below:
Code:
twoway (bar black_mean CAT, barwidth(0.5) color(navy))(rcap black_ci_u black_ci_l CAT)(bar white_mean CAT, barwidth(0.5) color(green))(rcap white_ci_u white_ci_l CAT)(bar asian_mean CAT, barwidth(0.5) color(red))(rcap asian_ci_u asian_ci_l CAT)
Would appreciate any help!
Best,
Comment