Minimal visualization of an object of class "light_profile". The object returned is of class "ggplot" and can be further customized.

# S3 method for class 'light_profile'
plot(
  x,
  swap_dim = FALSE,
  facet_scales = "free_x",
  rotate_x = x$type != "partial dependence",
  show_points = TRUE,
  ...
)

Arguments

x

An object of class "light_profile".

swap_dim

If multiflashlight and one "by" variable or single flashlight with two "by" variables, swap the role of dodge/fill variable and facet variable. If multiflashlight or one "by" variable, use facets instead of colors.

facet_scales

Scales argument passed to ggplot2::facet_wrap().

rotate_x

Should x axis labels be rotated by 45 degrees?

show_points

Should points be added to the line (default is TRUE).

...

Further arguments passed to ggplot2::geom_point() or ggplot2::geom_line().

Value

An object of class "ggplot".

Details

Either lines and points are plotted (if stats = "mean") or quartile boxes. If there is a "by" variable or a multiflashlight, this first dimension is represented by color (or if swap_dim = TRUE by facets). If there are two "by" variables or a multiflashlight with one "by" variable, the first "by" variable is visualized as color, while the second one or the multiflashlight is shown via facet (change with swap_dim).