Adds a smoothed conditional mean line with a confidence band. Aids the eye in seeing patterns in the presence of overplotting.
Usage
mark_smooth(
plot,
mapping = NULL,
data = NULL,
position = NULL,
...,
method = NULL,
formula = NULL,
se = NULL,
rasterize = FALSE,
rasterize_dpi = 300,
rasterize_dev = "cairo"
)Arguments
- plot
A plotit object
- mapping
Optional new aesthetics
- data
Optional data for this layer
- position
Position adjustment.
- ...
Other arguments passed to
geom_smooth- method
Smoothing method:
"auto"(loess for n<1000, gam otherwise),"lm","glm","gam", or"loess".- formula
Formula to use in the smoothing function.
- se
If
TRUE(default), display confidence interval around smooth.- rasterize
If
TRUE, rasterize viaggrastr::rasterise().- rasterize_dpi
DPI for rasterization (default 300).
- rasterize_dev
Graphics device for rasterization (default
"cairo").
