View source: R/ggplot2_extensions.R
ggquicksave | R Documentation |
Calls ggsave with some defaults that I happen to like. As of
ggplot2 3.3.4,
ggplot2::ggsave()
uses ragg as the backend
device for saving.
ggquicksave(
filename,
plot = ggplot2::last_plot(),
width = 9,
height = 6,
units = "in",
dpi = 500,
...
)
filename |
File name to create on disk. |
plot |
Plot to save, defaults to last plot displayed. |
width , height , units |
Plot size in |
dpi |
Plot resolution. Also accepts a string input: "retina" (320), "print" (300), or "screen" (72). |
... |
Other arguments passed to |
## Not run:
library(ggplot2)
ggplot(mtcars, aes(mpg, wt)) +
geom_point()
ggquicksave("mtcars.png")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.