Download Chart Studio Graphs Into R Sessions
Download Chart Studio figures directly into your R session with the
api_download_plot() function. This takes the
plot_id of the Chart Studio plot and the
username of the plot's creator as arguments.
For example, to download https://plotly.com/~cpsievert/559 into R, call:
library(plotly) fig <- api_download_plot("559", "cpsievert") fig
Update The Layout on A Downloaded Graph
Once the figure is downloaded from Chart Studio into your R session, you can update its layout just like you would any other figure you create with the
plotly R package.
Note: If you were to re-upload this figure to Chart Studio, a new figure would be created unless you specify the same
filename as the figure that you downloaded. In that case, the existing figure will be overwritten.
p <- layout(fig, title = paste("Modified on ", Sys.time())) p
Adding a Trace to a Subplot Figure
fig <- api_download_plot("6343", "chelsea_lyn") p <- add_lines(fig, x = c(1, 2), y = c(1, 2), xaxis = "x2", yaxis = "y2") p
See the documentation for getting started with Chart Studio in R.