1

How do I turn off the lines that are projected onto the 3 axis planes of the plot when hovering over the data? I haven't been able to figure out which setting is used to switch these off.

plot with projected lines

library(plotly)

# data
x <- runif(50, 0, 1)
y <- runif(50, 0, 1)
z <- runif(50, 0, 1)

# hide grid
ax <- list(
  title = "",
  showgrid = FALSE
)

# produce 3d plot
plot_ly(x = ~x, y = ~y, z = ~z, type = 'mesh3d') %>% 
  layout(scene = list(xaxis = ax, yaxis = ax, zaxis = ax))
telfer
  • 15
  • 3

1 Answers1

0

The solution can be found here:

plot_ly(x = ~x, y = ~y, z = ~z, type = 'mesh3d') %>% 
  layout(scene = list(xaxis = list(showspikes=FALSE), 
                      yaxis = list(showspikes=FALSE), 
                      zaxis = list(showspikes=FALSE)))

enter image description here

Marco Sandri
  • 23,289
  • 7
  • 54
  • 58