Hi Everyone,
I have two treatments 1 and 2 and I want to plot mean and se of some variable for both treatments with different colors. I have the following code but that shows same color for both treatments. Can you please how can i modify so that it shows both bars in different colors.
I have two treatments 1 and 2 and I want to plot mean and se of some variable for both treatments with different colors. I have the following code but that shows same color for both treatments. Can you please how can i modify so that it shows both bars in different colors.
Code:
preserve statsby mean=r(mean) ub=r(ub) lb=r(lb) N=r(N), by(Treatment) clear: ci mean variable_Y twoway bar mean Treatment, barcolor(gs12 navy) barw(0.4) || rcap ub lb Treatment, legend(off) ylabel(140 (10) 200) xlabel(1 "Treatment1" 2 "Treatment2") ytitle(ECU) title(Variable Y) restore
Comment