ggsave: Save a ggplot

Description Usage Arguments Value See Also

View source: R/aa.R

Description

With respect to [ggplot2::ggsave()], this function checks the types and swaps the filename and plot arguments if needed, so it is pipeable

Usage

1
ggsave(filename, plot, ...)

Arguments

filename

File name to create on disk

plot

Plot to save

...

Arguments passed on to ggplot2::ggsave

filename

File name to create on disk.

plot

Plot to save, defaults to last plot displayed.

device

Device to use. Can be 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. 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.

Value

the ggplot object

See Also

ggplot2::ggsave


zeehio/ggpipe documentation built on May 29, 2019, 12:19 p.m.