Writes a plot through ggplot2::ggsave(). When width and height are not
supplied, the plot's own recommended dimensions are used; an explicit value
always overrides the recommendation.
Arguments
- x
A
ggplotobject, or a SimtablR object with anautoplot()method.- path
Output file path; the extension selects the device. When absent,
.pngis added. Supported suffixes are.png,.pdf,.svg,.jpeg,.jpg,.tiff,.tif,.bmp,.eps,.ps,.tex,.wmf, and.emf; device availability still depends on the platform.- width, height
Canvas size in inches. Default
NULL, meaning the plot's recommended dimensions.- dpi
Resolution for raster devices. Default
300.- overwrite
Logical. Existing files are protected by default; pass
TRUEto replace the destination explicitly.- ...
Passed to
ggplot2::ggsave().