Plotting different colours
1 回表示 (過去 30 日間)
古いコメントを表示
Hi Guys,
So I need to plot these three vectors -
1 has 100 elements, 2 has 598 and 3 has 100. I combine them into one. And then I generate a cumulative time axis and plot them. but I need the three vectors to be plotted in different colours. How do I do that?
Thanks
0 件のコメント
採用された回答
Sean de Wolski
2011 年 9 月 1 日
figure;
hold on
plot(1:100,x(1:100),'b-');
plot(101:(101+597),x(101:(101+597)),'r-');
%etc.
They key is to use hold on with separate calls to plot. Or to do all of the plotting in one line with different markers:
plot(x1,y1,'b-',x2,y2,'r-'); %etc.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!