save_gg: A version of ggsave() meant to be piped to from a ggplot call...

Description Usage Arguments

Description

A version of ggsave() meant to be piped to from a ggplot call or a ggplot object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
save_gg(
  plot = last_plot(),
  filename,
  device = NULL,
  path = NULL,
  scale = 1,
  width = NA,
  height = NA,
  units = c("in", "cm", "mm"),
  dpi = 300,
  limitsize = TRUE,
  ...
)

Arguments

plot

Plot to save, defaults to last plot displayed.

filename

File name to create on disk.

device

Device to use. Can either be a device function (e.g. png()), or one of "eps", "ps", "tex" (pictex), "pdf", "jpeg", "tiff", "png", "bmp", "svg" or "wmf" (windows only).

path

Path to save plot to (combined with filename).

scale

Multiplicative scaling factor.

width

Plot size in units ("in", "cm", or "mm"). If not supplied, uses the size of current graphics device.

height

Plot size in units ("in", "cm", or "mm"). If not supplied, uses the size of current graphics device.

units

Plot size in units ("in", "cm", or "mm"). If not supplied, uses the size of current graphics device.

dpi

Plot resolution. Also accepts a string input: "retina" (320), "print" (300), or "screen" (72). Applies only to raster output types.

limitsize

When TRUE (the default), ggsave will not save images larger than 50x50 inches, to prevent the common error of specifying dimensions in pixels.

...

Other arguments passed on to the graphics device function, as specified by device.


graiffgarcia/ggggR documentation built on Jan. 23, 2022, 12:51 p.m.