plot_save | R Documentation |
Save plots using ggsave but with some default arguments sorted
plot_save(
plot = ggplot2::last_plot(),
dir,
height = 6,
width = 8,
dpi = 320,
units = c("in", "cm", "mm", "px")
)
plot |
Which plot to save? Either an object or default to the |
dir |
What should the plot be saved as, and where? |
height |
Plot's height (default in inches) |
width |
Plot's width (default in inches) |
dpi |
Resolution |
units |
Measurement unit e.g. "in" = inches |
Saves a plot in the appropriate directory
## Not run:
mtcars %>%
ggplot(aes(x= cyl, y = mpg)) +
geom_point()
plot_save("viz/imaginary_plot.png", dpi = 700)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.