Turning a 3d Plot into a 2d Plot

11 views (last 30 days)
Leandro Nazzari
Leandro Nazzari on 29 Oct 2020
Commented: Cris LaPierre on 29 Oct 2020
Hello Everyone!
I currently have a 3d Plot which shows me the sea surface temperatur along the coast of Mauretania.
My temperatur variable consists of :
167 x values (Latitude)
168 y values (Longitude)
72 z values (depth)
To make a 3d plot, i used
pcolor(T(:,:,1)'), shading flat;
T = the variable temperature, and z=1 so i only have the surface value.
NOW I'd love to make a 2d Plot featuring the change of the temperatur depending on the depth -
SO i'd like to turn the xyz pcolor plot into a 2d plot where the y axis -> new x axis
and z axis -> new y axis
I just cant really make it work, i'm guessing i'll have to use linspace() somehow but since i'm new to matlab i dont really know where to start!
Thanks!

Answers (0)

Community Treasure Hunt

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

Start Hunting!