Single export entry point for all nmpilot plots: plot methods return the ggplot object and leave saving to this function.
Arguments
- plot
A ggplot (or patchwork) object.
- output_file
Output path. The file type is taken from the extension:
.jpg/.jpeg,.png,.pdfor.tif/.tiff. The directory is created if needed. (Formerlyfile, still accepted with a warning.)- width
Width in inches (default 9).
- height
Height in inches (default 5).
- dpi
Resolution in dots per inch (default 300; ignored for PDF).
- verbose
Print the path of the written file (default
TRUE).- ...
Former argument name, accepted with a warning until version 1.0.
Examples
if (FALSE) { # \dontrun{
p <- nm_plot_dv(nm_read_csv("data.csv")$data)
nm_export_plot(p, "figures/dv_vs_time.png")
} # }