save_png {tidytidbits}R Documentation

Save plot as PNG

Description

Save plot as PNG

Usage

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


[Package tidytidbits version 0.3.2 Index]