More line style in Matlab
716 ビュー (過去 30 日間)
古いコメントを表示
I have a code which goes like this:
clear;clc;close all;
x1=(linspace(1,3,1800))';
y1=(linspace(1,2,1800))';
y2=(linspace(2,3,1800))';
y3=(linspace(3,4,1800))';
y4=(linspace(4,5,1800))';
y5=(linspace(5,6,1800))';
y6=(linspace(6,7,1800))';
y7=(linspace(7,8,1800))';
y8=(linspace(8,9,1800))';
y9=(linspace(9,10,1800))';
plot(x1,y1,x1,y2,'--',x1,y3,':',x1,y4,'-.',x1,y5,x1,y6,x1,y7,x1,y8,x1,y9,'LineWidth',2)
As one can see from the plot, nine lines are there. Matlab gives variety of coloring option, but as far as line style is concerned, one can have only 4 options: -, --, : and :. . How can i increase this options?? I have to emphasis that I would NOT like to have markers in the plot.
I have generated the same plots on Grapher software, where once have variety of options. For instance, see the figure below. This has been made with following line options: Solid, 0.1 inch dash, 0.3 inch dash, 0.5 inch dash, Dash dot, Dash dot dot, Dash dot dot dot, Dash Dash dot dot, Dash Dash dot dot dot.
Thanks in advance...
2 件のコメント
HiWave
2020 年 3 月 12 日
I've wondered this for years. How can Matlab have such a poor selection of linestyles?
Zhibin Deng
2020 年 4 月 27 日
Same here. Even in MATLAB 2019, there are only FOUR line styles.
I'm wondering whether it is too difficult to add some line styles for MATHWORKS?
採用された回答
その他の回答 (2 件)
madhan ravi
2018 年 10 月 23 日
編集済み: madhan ravi
2018 年 10 月 23 日
plot(x,y,'-','LineWidth',10)
4 件のコメント
参考
カテゴリ
Help Center および File Exchange で Formatting and Annotation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!