save_plot_to_png: Saving a plot to a png, ready for use in a PowerPoint

View source: R/ggplot_tools.R

save_plot_to_pngR Documentation

Saving a plot to a png, ready for use in a PowerPoint

Description

Saving a plot to a png, ready for use in a PowerPoint

Usage

save_plot_to_png(plot, file_name, squared = FALSE)

Arguments

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)

Examples

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")

mark-me/graydon.package documentation built on Nov. 14, 2023, 5:31 p.m.