Exports a single plot, a composite, or a list of plots as a multi-page PDF (each list element becomes one page, in order).
Arguments
- plot
A plotit object, a
plotit_composite, or a list ofplotit/plotit_compositeobjects. A list is exported as a multi-page PDF and therefore requires a.pdffilename (ordevice = "pdf"): single-page devices would silently keep only the last page.- filename
Output filename (extension determines device, e.g., ".pdf").
- width
Output width (if NULL, uses meta then package default; for a list, applied to every page).
- height
Output height (if NULL, uses meta then package default; for a list, applied to every page).
- dpi
Resolution for raster formats (default 600, journal submission).
- device
Graphics device to use (if NULL, auto-detected from filename).
- ...
Additional arguments passed to
ggplot2::ggsave().
Examples
p <- plotit(iris, encode(x = Sepal.Width, y = Sepal.Length)) |> mark_point()
export(p, tempfile(fileext = ".png"), dpi = 72)