This function is deprecated, use save_image instead.
Usage
export(p = last_plot(), file = "plotly.png", selenium = NULL, ...)Arguments
- p
a plotly or ggplot object.
- file
a filename. The file type is inferred from the file extension. Valid extensions include 'jpeg' | 'png' | 'webp' | 'svg' | 'pdf'
- selenium
used only when
pis a WebGL plot or the output format is 'webp' or 'svg'. Should be an object of class "rsClientServer" returned byRSelenium::rsDriver.- ...
if
pis non-WebGL and the output file format is jpeg/png/pdf arguments are passed along towebshot::webshot(). Otherwise, they are ignored.
Details
For SVG plots, a screenshot is taken via webshot::webshot().
Since phantomjs (and hence webshot) does not support WebGL,
the RSelenium package is used for exporting WebGL plots.