render_all() renders a list of independent plots to separate files across
CPU cores — small multiples, a batch export, one file per group. The work is
embarrassingly parallel (one whole plot per worker), and the result is
byte-identical to rendering them one by one. Parallelism uses process forks,
so it speeds things up on macOS/Linux and falls back to sequential on Windows;
it is only worth it for several substantial plots.
Arguments
- plots
A named or unnamed list of plots.
- paths
Output paths, one per plot (the format of each comes from its extension, as in
render_plot()). As a shortcut, whenplotsis namedpathsmay be a single existing directory, and each plot is written to<name>.pnginside it.- workers
Number of parallel workers;
NULL(default) uses the available cores.1forces sequential.- ...
Passed to each
vellum::render()(e.g.text,cvd).
Examples
plots <- list(
wt = vplot(mtcars) |> mark_point(x = wt, y = mpg),
hp = vplot(mtcars) |> mark_point(x = hp, y = mpg)
)
render_all(plots, tempdir())
