Use 'ggsave' to save figs in both png and pdf, default to 600dpi, store in working folder unless 'folder_name' is named.
1 2 3 4 5 6 7 | ggsave.figs(
myplot,
file_name = "myplot",
width = 8,
height = 6,
folder_name = ""
)
|
myplot |
ggplot2 object |
file_name |
the name of the plot file, e.g, "plot1" |
width |
width for ggsave |
height |
height for ggsave |
folder_name |
the name of the folder, e.g. "figure", if provided, the directory will be created if not there |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.