ggpreview | R Documentation |
uses ggsave
to save a ggplot object to file and then opens a new device and displays it.
ggpreview(
plot = ggplot2::last_plot(),
filename = tempfile(fileext = ".png"),
...
)
plot |
Plot to save, defaults to last plot displayed. |
filename |
File name to create on disk. |
... |
Arguments passed on to
|
ggsave
## Not run:
library(ggplot2)
p <- ggplot(mtcars, aes(mpg, wt)) +
geom_point() +
ggpreview()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.