Hi, I am new to the lovely forum. I want to add error bar at the top of each of the bars in this graph. How can I do it?
Thanks in advance for the help.
sysuse auto, clear preserve gen Treatment = foreign + 1 statsby, by(Treatment) clear: ci mean mpg foreach v in mean ub lb { separate `v', by(Treatment) } twoway scatter mean1 Treatment, ms(O) mcolor(stc1) || /// scatter mean2 Treatment, ms(O) mcolor(stc2) || /// rcap ub1 lb1 Treatment, lw(medium) lc(stc1) || /// rcap ub2 lb2 Treatment, lw(medium) lc(stc2) legend(off) /// xlabel(1 "Treatment 1" 2 "Treatment 2", noticks) xsc(r(0.8 2.2)) ytitle(whatever) title(better title needed) xtitle("") aspect(1) restore
Comment