fsolt / dotwhisker

Dot-and-Whisker Plots of Regression Results
https://fsolt.org/dotwhisker/
Other
57 stars 10 forks source link

Changing font and axis scale in dwplot() #97

Closed Jakub-42 closed 2 years ago

Jakub-42 commented 3 years ago

Hi,

I don't know why theme(text = element_text(family = font)) doesn't work for dwplot when it is based on ggplot2.

Also, I would like to ask how I can set x-axis scale in dwplot().

Many thanks,

Jakub

sammo3182 commented 3 years ago

Do you have a replicable example for your issue. the font works well in my side.

library(dotwhisker)

m1 <- lm(mpg ~ wt + cyl + disp + gear, data = mtcars)
dwplot(m1) +
  theme(text = element_text(size = 16, family = "serif")) 

image

And you adjust the scale of the x axis just as you do with ggplot through functions such as xlim