For loop color plot
古いコメントを表示
I am developing for loop for importing the data from excel and plotting but I am getting confusion in changing the colors ...How should I change the color also for did condition i,e for first red , second blue and so on ...I tried to used 2 for loops one for color and one for loading file....Can someone please help me in this ..thank you in advance
e=xlsread(' all values.xlsx');
time=Temps';
subplot(1,3,1)
for m= 1:3
plot(time,e(:,m));
hold on
xlim([0 200])
xlabel('time')
ylabel('CHC emission')
end
5 件のコメント
Have a look on below link to know more
col=['r' 'g' 'b'];
x = 1:1:10;
y = [1:1:10;1:10:100;1:5:50];
for i = 1:3
plot(x,y(i,:),'color',col(i));hold on
end
Prasad Joshi
2022 年 1 月 28 日
編集済み: Prasad Joshi
2022 年 1 月 28 日
Ankit
2022 年 1 月 28 日
can you post the code? It is not clear for me when you say its not running? Are you facing some issues/error?
Prasad Joshi
2022 年 1 月 28 日
Prasad Joshi
2022 年 2 月 10 日
編集済み: Prasad Joshi
2022 年 2 月 10 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Graphics Performance についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
