Search code examples
legendstatacoefplot

Changing legend text size coefplot


I am working on coefplot and I would like to readjust the legend size of the labels to vsmall. However, when I use labsize(vsmall)). I get an error. Am I missing a specific step within coefplot?

coefplot weight height, xtitle(Medical Records) ytitle(Share) ///
vertical recast(bar) barwidth(0.15) finten(60)  plotlabels("male" "female" "child"   ///
"adult", labsize(vsmall)) graphregion(color(white)) bgcolor(white)

Thank you.


Solution

  • you will want to remove labsize(vsmall) from your command entirely, and add legend(size(vsmall)) to the end of your command as an option. Your final command should look like this:

    coefplot weight height, xtitle(Medical Records) ytitle(Share) vertical recast(bar) barwidth(0.15) finten(60) plotlabels("male" "female" "child" "adult") graphregion(color(white)) bgcolor(white) legend(size(vsmall))