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

AI Thread Summary
To create 3D line plots in MATLAB instead of surfaces, users can utilize the plot3() function, which allows for the plotting of discrete lines. The discussion highlights the challenge of MATLAB defaulting to surface plots when using meshgrid and mesh with discrete data. Suggestions include exploring graph3d for alternative plotting options and considering the waterfall function for specific visualizations. Clarification on the desired output is encouraged to provide more tailored assistance. The conversation emphasizes the need for precise plotting techniques in MATLAB for 3D line representations.
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!
 

Similar threads

Back
Top