How to change line style of a plotted graph?

208 ビュー (過去 30 日間)
Roel
Roel 2014 年 12 月 17 日
コメント済み: Roel 2014 年 12 月 18 日
Hello,
I would like to change the linestyle of a plotted graph for making color blind people to understand my graph. The graph is already plotted. I have no basic data (anymore), but only the saved figure. I tried the follwing:
hline = findobj(gcf, 'type', 'line')
set(hline(1),'LineStyle',':')
But that didnt seem to work.I added my graph.
Does anyone knows how to do this?
Roe
  6 件のコメント
Roel
Roel 2014 年 12 月 18 日
I do manage to change the legend of the figure. But the plotted lines in the figure remain the same.
Roel
Roel 2014 年 12 月 18 日
I found my mistake, had to change 1 in hline(1) to 7,8 or 9. Thanks anyway.

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

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 12 月 17 日
If we test this example
plot(1:44)
hline = findobj(gcf, 'type', 'line')
set(hline(1),'LineStyle','--')
It seems to work

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by