Export plots to PNG, PDF or SVG in batch
Usage
cr_export_plots(
plots,
path,
format = c("png", "pdf", "svg"),
width = 6,
height = 4,
dpi = 300,
...
)Arguments
- plots
A named list of ggplot2 objects. Unnamed elements are numbered.
- path
Output directory, created when needed.
- format
"png","pdf"or"svg".- width, height
Figure dimensions in inches.
- dpi
Resolution for raster outputs.
- ...
Further arguments passed to
ggplot2::ggsave().
See also
Other reporting:
cr_export_results(),
cr_export_tables(),
cr_render_report(),
cr_report(),
cr_table_qc(),
cr_tables()
Examples
exp <- cr_example_experiment(seed = 1, n_cells_per_well = 20)
p1 <- cr_plot_intensity(exp, "marker_1")
out <- tempfile("plots_")
cr_export_plots(list(intensity = p1), out, width = 4, height = 3)