Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

export

Export a plotly graph to a static file


Description

This function is in the process of being deprecated (use orca 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 p is a WebGL plot or the output format is 'webp' or 'svg'. Should be an object of class "rsClientServer" returned by RSelenium::rsDriver.

...

if p is non-WebGL and the output file format is jpeg/png/pdf arguments are passed along to webshot::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.

Author(s)

Carson Sievert


plotly

Create Interactive Web Graphics via 'plotly.js'

v4.10.0
MIT + file LICENSE
Authors
Carson Sievert [aut, cre] (<https://orcid.org/0000-0002-4958-2844>), Chris Parmer [aut], Toby Hocking [aut], Scott Chamberlain [aut], Karthik Ram [aut], Marianne Corvellec [aut] (<https://orcid.org/0000-0002-1994-3581>), Pedro Despouy [aut], Salim Brüggemann [ctb] (<https://orcid.org/0000-0002-5329-5987>), Plotly Technologies Inc. [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.