Wrapper around ggplot2::ggsave()
that renders the last ggplot/grob as an image to a special folder
and opens it using the system's default app for the graphic type.
Arguments
- ...
Passed to
ggplot2::ggsave()
, overridingpath
andfilename
.- load_as_magick
Whether to show information about the saved plot and invisibly return an ImageMagick object of the plot for post-processing. Defaults to
FALSE
.
Note
Creates a folder /.ggsave_auto
in the working directory where figures are saved
with zero-padding to 3 digits (e.g., ggsave_auto-001.png
). Appends .ggsave_auto
to
a .gitignore
file if it exists.
Global params can be set through options()
, with the argument name followed by pgl.ggsave_auto.
such as options(pgl.ggsave_auto.width = 7)
.