save_plot: Save plot

Description Usage Arguments Examples

View source: R/plot.R

Description

The width and height are read from the plot if it was created from a stimlist, but can be overridden by setting width and height (in pixels). Se scale to change proportionally.

Usage

1
save_plot(plot = ggplot2::last_plot(), filename, ...)

Arguments

plot

Plot to save.

filename

File name to create on disk. Include the extension.

...

Other arguments to pass to ggplot2::ggsave.

Examples

1
2
3
4
5
6
## Not run: 
  p <- demo_stim("test") %>% plot()
  save_plot(p, "img.png")
  save_plot(p, "img.jpg", scale = 2)

## End(Not run)

facelab/webmorph documentation built on April 11, 2021, 6:34 a.m.