View source: R/plot_light_ice.R
plot.light_ice | R Documentation |
Minimal visualization of an object of class "light_ice" as ggplot2::geom_line()
.
The object returned is of class "ggplot" and can be further customized.
## S3 method for class 'light_ice'
plot(x, facet_scales = "fixed", rotate_x = FALSE, ...)
x |
An object of class "light_ice". |
facet_scales |
Scales argument passed to |
rotate_x |
Should x axis labels be rotated by 45 degrees? |
... |
Further arguments passed to |
Each observation is visualized by a line. The first "by" variable is represented by the color, a second "by" variable or a multiflashlight by facets.
An object of class "ggplot".
light_ice()
fit_full <- lm(Sepal.Length ~ ., data = iris)
fit_part <- lm(Sepal.Length ~ Petal.Length, data = iris)
mod_full <- flashlight(model = fit_full, label = "full", data = iris)
mod_part <- flashlight(model = fit_part, label = "part", data = iris)
mods <- multiflashlight(list(mod_full, mod_part))
plot(light_ice(mod_full, v = "Species"), alpha = 0.2)
indices <- (1:15) * 10
plot(light_ice(mods, v = "Species", indices = indices))
plot(light_ice(mods, v = "Species", indices = indices, center = "first"))
plot(light_ice(mods, v = "Petal.Width", by = "Species", n_bins = 5, indices = indices))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.