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

Click For Summary
SUMMARY

This discussion focuses on generating 3D line plots in MATLAB using the meshgrid and mesh functions. Users express frustration with MATLAB's default behavior of creating surfaces instead of discrete lines. The recommended solution is to utilize the plot3() function, which allows for the creation of 3D line plots. Additionally, alternatives like waterfall and graph3d are suggested for different plotting styles.

PREREQUISITES
  • Familiarity with MATLAB programming environment
  • Understanding of 3D plotting concepts
  • Knowledge of meshgrid and mesh functions in MATLAB
  • Basic understanding of the plot3() function
NEXT STEPS
  • Research how to use the plot3() function in MATLAB for 3D line plotting
  • Explore the waterfall function for alternative 3D visualizations
  • Learn about the graph3d function for advanced 3D plotting techniques
  • Investigate customizing 3D plots in MATLAB for better visual representation
USEFUL FOR

This discussion is beneficial for MATLAB users, data visualizers, and engineers looking to create effective 3D line plots rather than surfaces in their graphical 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

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K