save_plot_to_file | R Documentation |
Save a non-ggplot2 plot to a png file
save_plot_to_file(code, filename, width = 1000, height = 750)
code |
A code chunk that produces a plot |
filename |
The desired filename |
width |
Width of image |
height |
Height of image |
The output of the code chunk if any, invisibly
plot(1:3)
save_plot_to_file(plot(1:3), filename = "test.png")
file.remove("test.png")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.