
複数のラインを描写したとき、モノクロプリンタに出力するために、自動的にラインスタイルを指定する方法はありますか?
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
MathWorks Support Team
il 25 Ott 2013
Risposto: MathWorks Support Team
il 25 Ott 2013
複数のラインを描写したとき、モノクロプリンタに出力するために、自動的にラインスタイルを指定する方法はありますか?
Risposta accettata
MathWorks Support Team
il 25 Ott 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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su ライン プロット in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!