View source: R/plot-save-render.R
ggsave2 | R Documentation |
Wrapper around ggplot2::ggsave()
that opens rendered output using the system's default app for the graphic type.
ggsave2(..., load_as_magick = FALSE)
... |
Passed to |
load_as_magick |
Whether to show information about the saved plot and invisibly return an ImageMagick object of the plot for post-processing. Defaults to |
width
Defaults to 5.2in, 80% of the full-width of letter-sized paper (8.5in) minus 1in margins. Accepts a string of percentage scale (ex: "50%").
height
Defaults to 3in, 33% of the full-width of letter-sized paper (11in) minus 1in margins. Accepts a string of percentage scale (ex: "50%").
If either width or height are specified as percentages, the following defaults are also set:
dpi
300, the print standard.
units
"in"
## Not run:
# p <- ggplot2::qplot(mpg, hp, data = mtcars)
# ggplot2::ggsave2("myplot.png", p, width = "50%", height = "30%")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.