ggsave | R Documentation |
ggsave
aliasggsave
, but with default values.
ggsave( filename, plot = ggplot2::last_plot(), device = NULL, path = NULL, scale = 1, width = 8.5, height = 4.75, units = "in", dpi = 600, limitsize = TRUE, ... )
filename |
File name to create on disk. |
plot |
Plot to save, defaults to last plot displayed. |
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 of the directory to save plot to: 'path' and 'filename' are combined to create the fully qualified file name. Defaults to the working directory. |
scale |
Multiplicative scaling factor. |
width, height, 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'. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.