MATLAB: 3D plots- How to plot 3D lines rather than surface?

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 82K views
hanson
Messages
312
Reaction score
0
Hi all.
I am using meshgrid and mesh to plot 3D graphs in MATLAB.
Though my meshgrid is quite "discrete", MATLAB always try to generate surface for me.
What I actually want is some discrete lines rather than the surface.
Anyone can teach me how to obtain discrete lines?
 
Physics news on Phys.org
I'm not quite sure what you want...
Try looking at graph3d for the different plots.
Perhaps waterfall is what you want?
 
hanson said:
Hi all.
I am using meshgrid and mesh to plot 3D graphs in MATLAB.
Though my meshgrid is quite "discrete", MATLAB always try to generate surface for me.
What I actually want is some discrete lines rather than the surface.
Anyone can teach me how to obtain discrete lines?

you can use plot3() to draw 3d lines.
but I'm not sure what you really want!