Add more line styles and allow customized line styles

22 ビュー (過去 30 日間)
Feng
Feng 2023 年 10 月 19 日
コメント済み: Marco Riani 2025 年 5 月 17 日
Currently, matlab only supports 5 line styles (-,-.,--,:,none). And the dash-dot -. and dotted : lines are poor and look like a solid line. There is no neat way to have more line styles without influencing other elements, such as the legend, in the figure. I am wondering why matlab has never provided more line options, such as long dashed, dash-dot-dot, wavy lines, etc. Besides, it would be very nice if we can easily customize our own line styles, like the python matplotlib (https://matplotlib.org/stable/gallery/lines_bars_and_markers/linestyles.html). Adding these functions would not be so difficult for mathworks but will certainly make matlab more powerful in plotting figures. It will also make matlab more competitive. I do not see any reason not to add these features. Therefore, I strongly suggest mathworks to add these changes to matlab in the next version.
  2 件のコメント
Stephen23
Stephen23 2023 年 10 月 19 日
"Therefore, I strongly suggest mathworks to add these changes to matlab in the next version."
This is a forum of random volunteers, we are not TMW.
If you want TMW to make changes to MATLAB then make an enhancement request.
Feng
Feng 2023 年 10 月 19 日
thanks. I have sent a request to mathworks. Hope they can add these features in the future.

サインインしてコメントする。

採用された回答

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023 年 10 月 19 日
There are some matlab functions written by 3rd party MATLAB developers by which you can adjust the line type and length of each dash, etc - SEE LINK that you can download and use/edit as you wish.
Here is another discussion solution proposed by MathWorks - see
All the best.
  2 件のコメント
Feng
Feng 2023 年 10 月 19 日
Thanks. I am aware of these 3rd party scripts. But they are not as convenient as the supported line styles and may have problems in the legend, etc. I just want to raise this question and hope mathworks can add these features in the future. I have sent a suggestion to them.
Marco Riani
Marco Riani 2025 年 5 月 17 日
This is just to say that I fully agree with what @Feng on 19 Oct 2023 wrote.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Performance についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by