フィルターのクリア

change the color of multi lines in a graph

3 ビュー (過去 30 日間)
Andrea
Andrea 2012 年 8 月 24 日
I have a function in a loop in which something plots and hold on the previous ones. After the loop I have a figure with 6 line (graph) in it. I want to change the color of each one but I simply cannot! can you please help me?
Kind Regards, Andrea

採用された回答

Doug Hull
Doug Hull 2012 年 8 月 24 日
when you create each one, you can specify the color:
colVec = [1 0 1;
0 1 1;
1 1 0]
clf
for i = 1:3
plot([1,2],rand(1,2),'color',colVec(i,:))
hold on
end
Alternately, you could save the handles as you are making these and set the colors later.
  1 件のコメント
Andrea
Andrea 2012 年 8 月 24 日
Thanks so much.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeBlue についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by