save_plot_png: Save CroPlotR plot

View source: R/save_plot_png.R

save_plot_pngR Documentation

Save CroPlotR plot

Description

Save the plots to disk

Usage

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.

Details

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

Value

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


SticsRPacks/CroPloteR documentation built on Dec. 16, 2024, 12:20 a.m.