Description Usage Arguments Value Examples
Save a ggplot and output a path suitable for an extarnal targets file
1 |
path |
A path where to save the plot. |
plot |
An object of class "ggplot". |
A character string.
1 2 3 4 5 6 7 8 9 | library(ggplot2)
plot <- ggplot(airquality, aes(Ozone, Day)) +
geom_smooth(method = "lm")
path <- tempfile(fileext = ".png")
out <- save_plot(path, plot)
out
file.exists(out)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.