Black Lives Matter. Please consider donating to Black Girls Code today.
Dash Enterprise delivers an incredible 21x cost savings 💸Download the e-book!

Surface plot vertical plane

Hello all,

how to make vertical plane with surface plot (x=0 or y=0)? Found similar question here Several surfaces / planes for x values with no answer… unfortunately.

This example doesn’t work:

xz= matrix(runif(50),5,10)

plot_ly(y = xz, type = “surface”)

Thank you in advance!

I came up with this (very steep plane):

height = 200
x= 1:ncol(volcano)
y = seq(0.001,height*0.001,by=0.001)
altitude = matrix(,height,ncol(volcano))
for (i in 1:nrow(z)) {
altitude[i,] = i
color = matrix(runif(height),height,ncol(volcano))

p <- plot_ly(z=volcano, type = “surface”, showscale = T)
p <- add_trace(x = x, y = y, z = altitude, type = “surface”, surfacecolor = color, showscale = F)

but is there a more sophisticated solution, please?