Plotting a 3D surface on the XZ plane
13 views (last 30 days)
Show older comments
I've got some 3D surface data I want to visualise, which I've been using the surf(X,Y,Z) function for. This creates a 'horizontal' surface in the XY plane. However, some of the 3D data I am visualising describes a 'vertical' surface (like a wall), and so I would like to plot it in the XZ plane, with the y values being depth.
I have tried plotting the data as a 'horizontal' XYZ surface and rotating the view - but because of how 'surf' works this will only provide a 2D view with no depth element (Matlab will only provide a 3D view from 'above'). You can of course create a surface by swapping the depth and height axes (i.e. plot surf(X,Z,Y)), but this still only creates a surface in the XY plane with Z depth values. I want to create a surface in the XZ plane, with Y values. Any ideas?
0 Comments
Answers (1)
Star Strider
on 20 Jan 2017
I’m not certain what you’ve already done. I would use the rotate (link) function. You might have to re-label your axes later, but that is relatively straightforward.
4 Comments
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!