What exactly is the z argument in plot_ly?
问题 I have three variables: x , y , and z and I want to produce a surface plot. z<-runif(50,0,1) y<-runif(50,1,2) x<-runif(50,3,6) plot_ly(x = ~x, y = ~y, z= ~z) %>% add_surface() I get the following error Error: `z` must be a numeric matrix What exactly does z represent if not the variable corresponding to the vertical axis? I have seen the Volcano example where they use the matrix to generate that plot, but I still am not sure what that z matrix represents in that example either. What I would