Hello, I am very new to Stata and I cannot figure out how I can color-code each value of this variable and make it appear in the legend section at the bottom so it's visually appealing.

Code used: histogram babo2, discrete percent fcolor(maroon) lcolor(white) addlabel addlabopts(mlabsize(small)) ytitle(Percent) xtitle(Years of Education Completed) xmtick(, labels labcolor(black) format(%9.0g) glcolor(pink)) xlabel(0"None" 1"Incomplete Primary" 2 "Complete Primary" 3 "Incomplete Secondary" 4 "Complete Secondary") title(Education Completed) legend(on)

If there's any instruction through the do-file or the graphic editor that I can do this from, that would be so helpful.
I am doing this for a class that requires very basic Stata knowledge so I believe the solution is not too complicated.
Thank you so much.
Code used: histogram babo2, discrete percent fcolor(maroon) lcolor(white) addlabel addlabopts(mlabsize(small)) ytitle(Percent) xtitle(Years of Education Completed) xmtick(, labels labcolor(black) format(%9.0g) glcolor(pink)) xlabel(0"None" 1"Incomplete Primary" 2 "Complete Primary" 3 "Incomplete Secondary" 4 "Complete Secondary") title(Education Completed) legend(on)
If there's any instruction through the do-file or the graphic editor that I can do this from, that would be so helpful.
I am doing this for a class that requires very basic Stata knowledge so I believe the solution is not too complicated.
Thank you so much.
Comment