
複数のラインを描写したとき、モノクロプリンタに出力するために、自動的にラインスタイルを指定する方法はありますか?
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 25 Oct 2013
Réponse apportée : MathWorks Support Team
le 25 Oct 2013
複数のラインを描写したとき、モノクロプリンタに出力するために、自動的にラインスタイルを指定する方法はありますか?
Réponse acceptée
MathWorks Support Team
le 25 Oct 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur ライン プロット dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!