save_plot | R Documentation |
Saving a ggplot into a pdf then converting the pdf into a png file. The filenames will automatically be saved with a pdf and png extension.
save_plot(
pdfname,
plot = last_plot(),
width = 100,
height = 100,
units = "mm",
density = 300
)
pdfname |
the pdf filename |
plot |
the ggplot object or the most recent figure in the plot panel. |
width |
the width of the saved plot in mm. The default is 100. |
height |
the height of the saved plot in mm. The default is 100. |
units |
the units of the plot dimensions. The default is "mm". |
density |
the density of the png file in pixels. The default is 300. |
## Not run:
save_plot("filename.pdf", width = 100, height = 100, units = "mm")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.