
複数のラインを描写したとき、モノクロプリンタに出力するために、自動的にラインスタイルを指定する方法はありますか?
10 views (last 30 days)
Show older comments
MathWorks Support Team
on 25 Oct 2013
Answered: MathWorks Support Team
on 25 Oct 2013
複数のラインを描写したとき、モノクロプリンタに出力するために、自動的にラインスタイルを指定する方法はありますか?
Accepted Answer
MathWorks Support Team
on 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 Comments
More Answers (0)
See Also
Categories
Find more on ライン プロット in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!