Save a plot as image
ggsave2(
plot = ggplot2::last_plot(),
dir = NULL,
name = "Plot",
xt = "png",
dpi = 600,
width = 21,
height,
scale = 1,
replace = FALSE,
open = rlang::is_interactive()
)
Creates a file, and opens it in `RStudio` viewer, as a side effect.
The plot, created with ggplot2.
If saved as file, the directory in which to save the html widget.
Default to temporary directory. Set global option "ggfacto.export_dir"
with link[base:options]{options}
to change default directory.
The name of the file to save.
The extension name, when saving as image (interactive graph will always be .html).
The resolution.
The width in centimeters.
The height in centimeters. By default, width/1.41
.
Fixed ratio between horizontal and vertical axes.
Replace file ? By default, number added to find a new name.
Should the resulting file be opened at once ?