View source: R/plot_light_scatter.R
plot.light_scatter | R Documentation |
Values are plotted against a variable. The object returned is of class "ggplot"
and can be further customized. To avoid overplotting, try alpha = 0.2
or
position = "jitter"
.
## S3 method for class 'light_scatter'
plot(x, swap_dim = FALSE, facet_scales = "free_x", rotate_x = FALSE, ...)
x |
An object of class "light_scatter". |
swap_dim |
If multiflashlight and one "by" variable, or single flashlight with two "by" variables, swap the role of color variable and facet variable. If multiflashlight or one "by" variable, use colors instead of facets. |
facet_scales |
Scales argument passed to |
rotate_x |
Should x axis labels be rotated by 45 degrees? |
... |
Further arguments passed to |
An object of class "ggplot".
light_scatter()
fit <- lm(Sepal.Length ~ ., data = iris)
fl <- flashlight(model = fit, label = "ols", data = iris)
plot(light_scatter(fl, v = "Petal.Length", by = "Species"), alpha = 0.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.