| plotlySave | R Documentation |
plotlySave saves a plotly graphic with name foo.png where foo is
the name of the current chunk. You must have a free plotly account
from plot.ly to use this function, and you must have run
Sys.setenv(plotly_username="your_plotly_username") and
Sys.setenv(plotly_api_key="your_api_key"). The API key can be found
in one's profile settings. See
http://stackoverflow.com/questions/33959635/exporting-png-files-from-plotly-in-r.
plotlySave(x, ...)
x |
a |
... |
additional arguments passed to |
called for its side effect of writing one or more PNG files;
returns invisible(NULL)
# ```{r chunkname}
# p <- plotly::plot_ly(...)
# plotlySave(p) # creates fig.path/chunkname.png
# ```
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.