0
我想設置標籤,只有光標指向的值纔會顯示。相反,當前代碼顯示任何x值的所有y值。如何以陰謀顯示只有懸停的標籤?
library(plotly)
data_frame(noiseLevel=sort(rep(seq(10,50,10),5)),
temperature=rep(seq(50,90,10),5),
testScore=c(30,75,20,50,70,
40,60,45,20,50,
30,20,30,40,30,
60,30,60,20,50,
30,50,20,40,60)) -> dt
plot_ly(data=dt,
x = noiseLevel,
y = testScore,
color=factor(temperature),
name = "linear", line = list(shape = "linear"))