save_plot | R Documentation |
After having defined a plot function, use this tool to save the plot to file (.png or .pdf).
save_plot(FUN, file = NULL, w = 6, h = 6, view = TRUE, ...)
FUN |
Function making the plots (e.g., hist) |
file |
Where to save the figure |
w |
Figure width in inches |
h |
Figure height in inches |
view |
Logical, open the saved file |
... |
Arguments passed to the FUN function |
save_plot(hist, x = rnorm(1e3), file = tempfile(fileext = ".png"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.