3D surface plot

5 views (last 30 days)
Alan
Alan on 6 Jan 2021
Edited: Alan on 12 Jan 2021
Hello,
I have plot a 3d figure. But the height on the z-axis looks like a flat 2d surface.
How can I plot the height and makes the height displays like a 3d surface.
Many thanks!
  4 Comments
VBBV
VBBV on 6 Jan 2021
Edited: VBBV on 6 Jan 2021
May be you're equations for Z axis produces flatter surfaces. Or try with varied xlim and ylim range values in meshgrid generation for surf plot
Alan
Alan on 6 Jan 2021
Thanks. The surf plot is what I want to realize.

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 6 Jan 2021
It depends what your data are.
If you are currently using scatter3 or plot3, and your data are reasonably ordered, instead use surf.
If your data are random, create a surface using griddata (or similar functions) to interpolate your point data to a surface that surf can use.
  2 Comments
Alan
Alan on 6 Jan 2021
Thank you. The surf function works here.
Star Strider
Star Strider on 6 Jan 2021
My pleasure!
If my Answer helped you solve your problem, please Accept it!
Also, although I wrote ‘random’ I meant ‘scattered’ .

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!