Skip to contents

Save plots by name

Usage

save_plots(plots, save_path = NULL, type = "png", ...)

Arguments

plots

A named list of ggplot2 plots.

save_path

A character string indicating where to save plots if required.

type

A character string indicating the format to use to save plots.

...

Additional arguments passed to ggplot2::ggsave()

Examples

posterior <- fv_example(strains = 2, type = "posterior")
p <- plot(posterior, type = "all")
save_plots(p, save_path = tempdir())
#> Saving 6.67 x 6.67 in image
#> Saving 6.67 x 6.67 in image
#> Saving 6.67 x 6.67 in image
#> Saving 6.67 x 6.67 in image
#> Saving 6.67 x 6.67 in image
#> Saving 6.67 x 6.67 in image