Project 3D surface onto 2D plot

106 views (last 30 days)
yoni verhaegen
yoni verhaegen on 26 Jan 2018
Answered: Hyunjung Lee on 15 Mar 2019
Hi all,
I have a set of X,Y,Z data where X and Y represent coordinates and Z the corresponding elevation. How can I now plot a 2D image with the projection of the 3D surface on it?
In stead of:
I'd like to have something like this:
Thanks!

Answers (2)

Hyunjung Lee
Hyunjung Lee on 15 Mar 2019
To look at the surface directly overhead of a colored surface, add the following lines after plotting,
shading interp % this changes the color shading (i.e. gets rid of the grids lines on the surface)
view(2) % same as view(0, 90)
Hope this helps!

Star Strider
Star Strider on 26 Jan 2018
After you plot your data, add this line:
view(0, 90)
See the documentation on the view (link) function for details.
Experiment to get the result you want.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!