View source: R/ggplot_functions.R
ggsave | R Documentation |
Edit of ggplot save (actually the cowplot implementation ggsave2) that includes some sensible defaults, defaults units to mm, and uses ImageMagick to trim whitespace from an exported png.
ggsave(
filename,
plot = ggplot2::last_plot(),
device = NULL,
path = NULL,
scale = 1,
width = NA,
height = NA,
units = c("mm"),
dpi = 600,
limitsize = TRUE,
border = 50,
...
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.