How to change line style of a plotted graph?

158 visualizzazioni (ultimi 30 giorni)
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 Commenti
Roel
Roel il 18 Dic 2014
I do manage to change the legend of the figure. But the plotted lines in the figure remain the same.
Roel
Roel il 18 Dic 2014
I found my mistake, had to change 1 in hline(1) to 7,8 or 9. Thanks anyway.

Accedi per commentare.

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Specifying Target for Graphics Output in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by