How to plot curve with one color without precising which color it is?

6 ビュー (過去 30 日間)
Hayfa R
Hayfa R 2019 年 12 月 11 日
回答済み: Philippe Lebel 2019 年 12 月 11 日
How can I plot curves with the same color without having to determine exactly what color I want? The plot function is inside a for loop and for each iteration I want to have a group of curves with the same color.

採用された回答

Philippe Lebel
Philippe Lebel 2019 年 12 月 11 日
aloa
for i = 1:10
if i == 1
h = plot(1:10,1:2*i:20*i)
v = get(h,'Color');
else
plot(1:10,1:2*i:20*i, 'Color', v)
end
hold on
end

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by