save_plot_to_png | R Documentation |
Saving a plot to a png, ready for use in a PowerPoint
save_plot_to_png(plot, file_name, squared = FALSE)
plot |
the ggplot, stored as a variable, which you want to save |
file_name |
the filename, excluding the extension, you ant to save the plot to |
squared |
logical indicating whether the plot is squared or landscape, conform to side by side side slide (squared = TRUE) or One graph in a slide (squared = FALSE) |
p < ggplot(data = mtcars,
mapping = aes(x = wt, y = mpg, color = as.factor(cyl))) +
geom_point()
save_plot_to_png(plot = p, file_name = "mtcars")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.