save_plot: Save the last generated figure

Description Usage Arguments Details Value See Also

View source: R/load_and_save_files.R

Description

Save the last generated figure locally.

Usage

1
2
3
4
5
6
7
8
save_plot(
  plot_file,
  width = NULL,
  height = NULL,
  units = "in",
  dpi = 300,
  device = NULL
)

Arguments

plot_file

String. File name that the figure shall be saved to. Can end in either ".png", ".tiff", ".pdf", ".jpeg", or ".bmp". For more information, see the documentation of ggplot2::ggsave().

width

Integer. Optional. Plot width. If width = NULL, width is set to the width of the plotting window.

height

Integer. Optional. Plot height If height = NULL, height is set to the height of the plotting window.

units

String. Units for width and height.

dpi

Integer. Resolution for raster graphics such as .pdf-files.

device

String or function. Specifies which device to use (such as "pdf" or cairo_pdf)

Details

Saves the last generated figure locally. Wrapper function of ggsave() from ggplot2. For further details, please see ?ggplot2::ggsave.

Value

Plot, locally saved.

See Also

ggplot2::ggsave()

Other external data functions: read_pubmed_jats(), read_pubmed(), save_excel()


JulFriedrich/miRetrieve documentation built on Sept. 20, 2021, 11:37 p.m.