pbreheny / visreg

Visualization of regression functions
http://pbreheny.github.io/visreg/
61 stars 18 forks source link

Override ggplot options #53

Closed jvcasillas closed 6 years ago

jvcasillas commented 6 years ago

I can't find any documentation regarding how to override the default settings when gg = TRUE. For example, I would like to plot a regression without the data points. That is, with only the regression line. Is this possible?

pbreheny commented 6 years ago

To leave out the partial residuals, you specify 'partial=FALSE`, just like a non-gg plot:

fit <- lm(Ozone ~ Solar.R + Wind + Temp, data=airquality)
visreg(fit, 'Wind', partial=FALSE, gg=TRUE)

(to leave off the rug too, rug=FALSE)

For more gg options, you may wish to look at http://pbreheny.github.io/visreg/gg.html; hope that helps!