save_png: Save plot as PNG

Description Usage Arguments Value

View source: R/plotting.R

Description

Save plot as PNG

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
save_png(
  plot,
  folder,
  fileBaseName,
  width,
  height,
  dpi = 300,
  background = c("white", "transparent"),
  ...
)

Arguments

plot

A plot object that can be printed, e.g. result of ggplot2, plot_grid

folder

Destination folder (will be created if it does not exist)

fileBaseName

File base name (suffix ".png" will be added)

width, height

PNG width and height in inches or as grid::unit. If missing and the plot object has a "papersize" attribute c(width, height), this will be used.

dpi

Resolution (determines file size in pixels, as size is given in inches)

background

Initial background color, "white" or "transparent"

...

Further arguments which will be passed to png, e.g. family

Value

invisible NULL


tidytidbits documentation built on March 8, 2021, 5:07 p.m.