anders-biostat / rlc

linked-charts from R
GNU General Public License v3.0
8 stars 1 forks source link

how to save the interactive plots? #14

Open YuanqiangDuan opened 5 years ago

YuanqiangDuan commented 5 years ago

Dear Simon,

I have made the interactive plots and when I click different points in "A1" place(a scatter plot), it will give different scatter plot in "A2" place. Now the plots are shown in R/linked-charts. But how can I save the interactive plots? So I do not need rerun the code if I want to open the plots.

library( rlc ) openPage(useViewer = F, layout="table2x1")

lc_scatter( dat( x = procdat_gen$Exprs, ## prodat_gen is a data.frame y = procdat_gen$total, label = procdat_gen$WellID, on_click = function(k){wellname <<- k; updateCharts(c("A2"))} ), place = "A1", )

lc_scatter( dat( x = CurrSg[which(CurrSg$WellID == procdat_gen$WellID[wellname] ),]$X405.A.A, ## CurrSg is a data.frame y = CurrSg[which(CurrSg$WellID == procdat_gen$WellID[wellname] ),]$X405.B.A ), place = "A2", )

best wishes yuanqiang

simon-anders commented 5 years ago

Yes, as long as your code is written in R, you need to have R running to execute it. You can translate it to JavaScript, and then it works stand-alone.

You could have a look at the JavaScript tutorial to see how that can be done. It should be quite easy -- unless you are completely unfamiliar with JavaScript.

Or you imply run R on a web server.