ggsave()
is a convenient function for saving a plot. It defaults to
saving the last plot that you displayed, using the size of the current
graphics device. It also guesses the type of graphics device from the
extension.
ggsave(filename, plot = last_plot(), device = NULL, path = NULL, scale = 1, width = NA, height = NA, units = c("in", "cm", "mm"), dpi = 300, limitsize = TRUE, ...)
"pdf"
). By default, extracted from filename extension.
ggsave
currently recognises eps/ps, tex (pictex), pdf, jpeg, tiff,
png, bmp, svg and wmf (windows only).TRUE
(the default), ggsave
will not
save images larger than 50x50 inches, to prevent the common error of
specifying dimensions in pixels.## Not run: # data(Feldspar) # base = ggtern(Feldspar,aes(Ab,An,Or)) + geom_point() # ggsave("./output.pdf",base,width=10,height=10) # ## End(Not run)