フィルターのクリア

How to change the curves to same colour when using hold on

17 ビュー (過去 30 日間)
Shan  Chu
Shan Chu 2016 年 5 月 19 日
回答済み: Star Strider 2016 年 5 月 19 日
Dear all, I am using a for-loop and hold on to plot a graph. As usual, Matlab automatically change the colour of legends but I want to keep all the legends in the same colour. Could you please help Thanks

採用された回答

Star Strider
Star Strider 2016 年 5 月 19 日
Specify the colours in each plot call:
figure(1)
plot(x(1,:), y(1,:), '-k')
hold on
for k1 = 2:N
plot(x(k1,:), y(k1,:), '-k')
end
hold off

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by