-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
saving plotly plots locally? #294
Comments
You can save a plot as standalone HTML with library(plotly)
p <- plot_ly(mtcars, x = ~mpg, y = ~disp, mode = "markers")
htmlwidgets::saveWidget(p, "index.html") Another option is to use If you want to save a plot as png/pdf/svg/etc, have a look at |
Thanks @cpsievert , |
export as.widget() for convenience sake. See #294
FYI, there is a warning message that contradicts the above statement
|
Thanks @kbeck527, |
Running out of memory while plotting 200k+ points. And I tried editbin /LARGEADDRESSAWARE to fix ref to https://jonathanchang.org/coding/fixing-pandoc-out-of-memory-errors-on-windows/ , but still same problem. Open web page locally and copy the temp html file instead of using htmlwidgets is fine, so if there is a way to get the temp local file URL by some function calls such that I don`t have to run htmlwidgets.
pandoc.exe: Out of memory
pandoc.exe: Out of memory |
You can also save it as a
|
does not work as it says : Webgl is not supported by browser. But the browser I use does support Webgl. I however also installed phantomjs too! How does it work for you? |
htmlwidgets::saveWidget(as_widget(p), file = "test_plotly_widget.html") worked for me (CRAN plotly version, RStudio 1.0.143). Frustratingly, plotly commands work in R console to produce charts viewable in Explorer but in RStudio I get just the axes and no data plotted. Saving as html does not work in R console (requires pandoc) but works from RStudio. |
Is it possible for saveWidget to add custom js file for plotly to add some aditional custom functionality. |
Hi,
When I plot outside of RStudio, the visualization opens on the default browser. The relevant files are located in a temporary location. What's the proper way to save the interactive visually locally? That is, analogous to the pdf and png functions in R. Would like to do that in order to embed elsewhere.
Thank you.
The text was updated successfully, but these errors were encountered: