[SOLVED] [Matlab]Plot3 Multiple Lines

Status
Not open for further replies.

roadking7755

Newbie level 2
Joined
Jan 30, 2012
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,291
Hi all,
I'm working on a project and was wondering how to plot multiple 3D lines on one grid. I have the 2D done and attached, but when I add a third dimension to plot3 it still shows a 2D plot like the one attached. Thanks

This is what I'm calling to try and draw the 3D lines, which has three arrays all the same length:

hold on
for i=1:length(mt)
plot3(mt(i).position_x), mt(i).position_y), mt(i).position_z)); %plot MTs
end
hold off

 

Attachments

  • 2D_plot.jpg
    151.4 KB · Views: 55
Last edited:

Change the axes. Thought I did it earlier but I guess not
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…