
複数のラインを描写したとき、モノクロプリンタに出力するために、自動的にラインスタイルを指定する方法はありますか?
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 25 Okt. 2013
Beantwortet: MathWorks Support Team
am 25 Okt. 2013
複数のラインを描写したとき、モノクロプリンタに出力するために、自動的にラインスタイルを指定する方法はありますか?
Akzeptierte Antwort
MathWorks Support Team
am 25 Okt. 2013
複数のラインを描写するとき、ラインスタイルを個々に指定するのではなく、自動的に指定するにはaxesオブジェクトのlinestyleorderプロパティを設定します。Linestyleorderプロパティを設定する際は、axesのcolororderプロパティを1色に設定してください。
例:ラインスタイルを実線、破線、点線、鎖線の順に設定します。
(コマンド例)
linestyle=str2mat('-','--',':','-.');
set(gca,'colororder',[0 0 0]);
set(gca,'linestyleorder',linestyle)
hold on
x=0:0.1:10;
y=[sin(x);cos(x);2*sin(x);2*cos(x)];
plot(x,y)
hold off
(コマンドの実行結果)

0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu ライン プロット finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!