I realize this is not exactly a programming question. I am running the following code and then exporting the plot as a web-page (using R Studio 1.0.44
& R 3.3.1
on Windows 10). When I try to open the saved web-page in Firefox 50.1.0
, I don't see anything. The web-page opens fine in Chrome. I have had the problem in two different computers. Could you please check if this is a reproducible problem. If you can think of something I may be doing wrong, please let me know.
set.seed(42)
mydata = data.frame(A = rnorm(20), B = rnorm(20), Index = sample(190:400,20))
require(plotly)
x = list(title = "A")
y = list(title = "B")
mydata$interval = cut(mydata$Index,breaks = 20)
plot_ly(mydata, x = ~A, y = ~B, type = "scatter",
mode = 'markers', hoverinfo = 'text', colors = colorRampPalette(c("red", "black"),
space = "rgb")(20),
color = ~Index, text = ~paste(interval), marker = list(size=14)) %>%
layout(xaxis = x, yaxis = y) %>%
colorbar(title = "My Legend")