Save the plots to disk

save_plot_png(
  plot,
  out_dir,
  suffix = "",
  width = 17,
  height = 12,
  units = "cm",
  dpi = 200,
  scale = 1.2,
  device = NULL,
  path = lifecycle::deprecated()
)

Arguments

plot

A list of ggplots : output of plot()

out_dir

The path to the directory where to save the plots

suffix

A suffix to append to the file name

width

The plot width

height

The plot heigth

units

The units for plot width and heigth in units ("in", "cm", or "mm")

dpi

The plot resolution.

scale

The scaling factor.

device

Device to use. Can either be a device function (e.g. png()), or one of "eps", "ps", "tex" (pictex), "pdf", "jpeg", "tiff", "png", "bmp", "svg" or "wmf" (windows only).

path

[Deprecated] path is no longer supported, use out_dir instead.

Value

Save the plots to path, named by the situation name, and returns the plots invisibly for piping.

Details

The function uses ggplot2::ggsave() under the hood.