save_plot: Save R plot with presets file formats

View source: R/utils_files.R

save_plotR Documentation

Save R plot with presets file formats

Description

Save R plot with presets file formats

Usage

save_plot(
  plot,
  file,
  path = "R/figures",
  size = c(148, 210),
  format = "jpg",
  dpi = NULL,
  bg = "#FEFAEE"
)

Arguments

plot

R plot object

file

file name without extension

path

file path without trailing backslash

size

numeric vector for image width and height in mm, default to A5

format

file format

  • png, print quality bitmap output (400 dpi, lossless)

  • jpg, default bitmap output (200 dpi, compressed)

  • snap, screen quality output (150 dpi, default path)

  • svg, vector format

dpi

resolution (dpi)

bg

background color passed to ggsave function


picasa/generate documentation built on Feb. 28, 2025, 6:51 a.m.