This function saves a ggplot2 plot to a temporary PNG file and then embeds it in an HTML
page, which is opened in the Viewer pane.
Usage
ggpreview(filename = "", plot, ...)
Arguments
- filename
This is ignored. It is included only for consistency with ggsave(). If a plot is given then it will be assigned to the plot argument.
- plot
Plot to preview.
- ...
Arguments passed to ggsave and the PNG device function.
Device
The plot is saved using ggsave with the png device, regardless of what is specified in
the call, so any arguments not used by ggsave or png are ignored.