extract_plot: Extract plot(s) from ggplot

View source: R/extract_plot.R

extract_plotR Documentation

Extract plot(s) from ggplot

Description

Extract a plot corresponding to one or several variables from a ggplot.

Usage

extract_plot(
  plot,
  var = NULL,
  situation = NULL,
  force = TRUE,
  verbose = TRUE,
  situations = lifecycle::deprecated()
)

Arguments

plot

The output of plot_situations.

var

Vector of variable names for which plots have to be extracted. Optional, all variables considered by default.

situation

A list of situations names to extract from a list of ggplots

force

Continue if the plot is not possible ? E.g. no observations for scatter plots. If TRUE, return NULL, else return an error.

verbose

Logical value for displaying information while running.

situations

[Deprecated] situations is no longer supported, use situation instead.

Value

A (printed) list of ggplot objects, each element being a plot for a situation


SticsRPacks/CroPloteR documentation built on April 1, 2024, 9:25 a.m.