Save the last generated figure locally.

save_plot(plot_file, width = NULL, height = NULL, units = "in", dpi = 300)

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.

Value

Plot, locally saved.

Details

Saves the last generated figure locally. Wrapper function of ggsave() from ggplot2.

See also

ggplot2::ggsave()

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