export_plot | R Documentation |
Convenient for keeping plots at the ready for presentations, papers, social media, etc.
export_plot(
x,
dirs = c("figs", "presentations/presentation-figs"),
formats = c("png", "pdf"),
rds = FALSE,
...
)
x |
ggplot object to save. The file name is automatically populated from the object's name. |
dirs |
directories in which to save the plots, defaults to 'figs' and 'presentations/presentation-figs', i.e. a directory named 'figs' located in the top level of current working directory and another one specifically for SVG versions of R plots used for HTML slide sets. |
formats |
character. Image-based file formats to include. Allowed formats include 'svg', 'png', and 'pdf'. |
rds |
Logical. Save also in binary .rds format? (Default |
... |
Other arguments passed to |
Writes files to disk and prints a message if successful
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.