sleepy
sleepy

Reputation: 153

xlim(), scale_x_continuous(), don't change axis limits on plot_summs() when plotting density

I can't get the plot_summs() function from the jtools package to centre on zero by manipulating the x limits. It works fine without the density plots as such:

test<-lm(mpg ~ cyl, data = mtcars)
plot_summs(test)+xlim(-5,5)

But once I add in plot.distributions=T to plot_summs(), it appears to just ignore it (or scale_x_continuous()). Any help appreciated.

test<-lm(mpg ~ cyl, data = mtcars)
plot_summs(test)+xlim(-5,5)

Also note that using coord_cartisian() achieves this outcome, but not without adding a large space to the plot which I don't know how to remove:

plot_summs(test, plot.distributions = T)+coord_cartesian(x = c(-5, 5))

I'm stuck! Thanks in advance.

Upvotes: 1

Views: 247

Answers (0)

Related Questions