Plotting three different datasets using plot3 function...how can I plot them each in a different color?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
My question is very simple. I have the following code:
plot3(Ch15,Ch13,Ch9)
How can I plot Ch15, Ch13, and Ch9 each in a different color on the same plot? Thanks for the help!
0 Kommentare
Antworten (2)
Sachin Ganjare
am 25 Okt. 2012
You can use 'axes colororder' property.
Refer below links for details:
0 Kommentare
Matt J
am 25 Okt. 2012
Bearbeitet: Matt J
am 25 Okt. 2012
Your question isn't entirely clear as written. When you have a statement like
plot3(Ch15,Ch13,Ch9),
the Ch15,Ch13 and Ch9 do not correspond to different lines. They are the x,y,z of the same space curve.
Nevertheless, you can put multiple curves on the same plot by supplying multiple triples, like below. MATLAB will automatically provide different colors for them, or you can specify your own, e.g.,
t = 0:pi/50:10*pi;
figure(1);
plot3(sin(t),cos(t),t, t,t,t)
figure(2);
plot3(sin(t),cos(t),t,'r',t,t,t,'y')
0 Kommentare
Siehe auch
Kategorien
Mehr zu Line Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!