Search code examples
graphicsstatacoefplot

In Stata, how can I adjust size of coefplot's headings?


I'm working with coefplot command (source, docs) in Stata plotting regression coefficients.

Taking the example from manual:

sysuse auto,clear
keep if rep78>=3

regress mpg headroom i.rep##i.foreign
coefplot, xline(0) omitted baselevels headings(3.rep78 = "{bf:Repair Record}" 0.foreign = "{bf:Car Type}" 3.rep78#0.foreign = "{bf:Interaction Effects}") drop(_cons)

That works as expected.

I'm now trying to tinker with the sizing of the labels of Y axis. I'd like to make them smaller to accommodate a large number of categories.

ylab(, labs(vsmall))

I cannot however resize the headings themselves. How can that be achieved?


Solution

  • You can add labsize(vsmall) as a suboption within headings(). Example:

    sysuse auto,clear
    keep if rep78>=3
    
    regress mpg headroom i.rep##i.foreign
    coefplot, xline(0) omitted baselevels ///
        headings(3.rep78 = "{bf:Repair Record}" 0.foreign = "{bf:Car Type}" ///
        3.rep78#0.foreign = "{bf:Interaction Effects}", labsize(vsmall)) drop(_cons)