How to change line style of a plotted graph?

조회 수: 74 (최근 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 CenterFile Exchange에서 2-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