简体   繁体   中英

Way to turn off dynamic contour line appearing in plotly surface plot?

Spent a pretty much time trying to turn off this interactive grey lines that appear when you point at the surface plot in R. The graph code is down there, from which can be seen that I unsuccessfully tried with false showspikes and showline. Also, tried with contour(x,y,z= show = FALSE), but nothing. Any way to do it?

plot_ly(y = as.numeric(substr(povrsina$x, 3, 8)), 
               x = as.numeric(substr(povrsina$y, 3, 8)),
               z = povrsina$z, type = "surface", hoverinfo = "none") %>% layout(scene = list(xaxis = list(showspikes=FALSE,showline= FALSE), 
                                                                                             yaxis = list(showspikes=FALSE, showline= FALSE), 
                                                                                             zaxis = list(showspikes=FALSE,showline= FALSE)))

在此处输入图像描述

On the way to report a bug, I found this discussion https://github.com/plotly/plotly.js/issues/1406 . Indeed, showspikes is not working as it should for surface plots. However, guide lines could be hidden with:

contours = list(x = list(highlight=F),
                y = list(highlight=F),
                z = list(highlight=F))

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