简体   繁体   中英

Exporting RBokeh Plot for Non-R Users

I have created an interactive plot in R using the RBokeh package. How do I save it so that it is a file that non R users can open and use? So basically currently I can hover my cursor over points in the plot and other information pops up for each data point making it interactive. I want to keep that format instead of just saving it as a picture.

Any help would be greatly appreciated, thanks!

Sample code:

install.packages("stringi")
install.packages("devtools")
library(devtools)

devtools::install_github("ramnathv/htmlwidgets")
devtools::install_github("bokeh/rbokeh")
library(rbokeh)
head(iris)
p <- figure() %>%
  ly_points(Sepal.Length, Sepal.Width, data = iris,
            color = Species, glyph = Species,
            hover = list(Sepal.Length, Sepal.Width))
p

Just figured it out. You can save it as an html file on your desktop and then you can email that file to whoever you please.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM