cex.var not working... How to change size of variables font in coefplot

707 views Asked by At

I'm trying to plot the coefficients (and 95% CIs) from a regression model in R but the variable names are tiny. I'm trying to increase the size of the names but the line cex.var=3.0 incoefplot(model, cex.var=3.0) doesn't seem to be changing anything.

I've tried: cex=3.0, cex.vars=3.0, and cex.lab=3.0 to no avail.

Any suggestions?

1

There are 1 answers

1
nathanesau On BEST ANSWER

The plot is made using ggplot2 so you need to use theme. Something like this

data(iris)
model <- lm(Sepal.Width ~ Sepal.Length, data=iris)
coefplot(model) + 
theme(text = element_text(size=30),
      axis.text.x = element_text(angle=90, vjust=1))