This function save a plot of a list of plots to provided path(s).
Arguments
- p
ggplot. A plot.- path
Character. Path(s) to save the image.
- width
Numeric. Width of the image.
- height
Numeric. Height of the image.
- ...
Other arguments passed to
ggplot2::ggsave().
Examples
p <- ggplot2::ggplot(cars) + ggplot2::geom_point(ggplot2::aes(dist, speed))
save_plot(p)
#> [1] "/var/folders/wz/gmj3w1c56x926crggz2jwbh80000gn/T//RtmpotDfMu/file15368170c7eb7.png"