How do I plot a vertical plane surface with a certain trace in the xy plane?


I am trying to plot a vertical plane (say, z is between 0 and 40). The plane needs to have the xy-trace (intersect the xy plane) in the shape of a line with a linear equation. So the equation of the plane is something like Ay+Bx=0. I can’t figure out how to do it using go.Surface. I figured out how to do a horizontal plane, a slanted plane, a weird shaped plane, but not a vertical one.

It seems like I should be able to have:


but I’m not sure what to do with the z. I tried this, among other things:

z=np.ones((len(x), len(y)))
for i in range(np.shape(z)[0]):
for j in range(np.shape(z)[1]):


fig=go.Figure(data=go.Surface(x=x,y=y, z=z))

However, that gives me a slanted plane.

I don’t quite understand how Surface works. How do I plot a vertical plane when z has to be a 2d array, so no matter what I put in there, the resulting plane will be something other than vertical (given both x and y are non-constant)?
I’ve also tried to omit the z altogether:


However, then the figure doesn’t show at all, so I guess that’s not allowed?

I’m sure I am missing something here, help would be tremendously appreciated.