Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

How can I call the properties of figure with more than 1 graph in it?

1 vue (au cours des 30 derniers jours)
Mohammad
Mohammad le 31 Jan 2014
Clôturé : MATLAB Answer Bot le 20 Août 2021
I have a figure that has more than 1 graphs in it. How can I change the lineStyle of each one?

Réponses (1)

Azzi Abdelmalek
Azzi Abdelmalek le 31 Jan 2014
t=0:0.1:10;
y1=sin(t)
y2=cos(t)
h=plot(t,y1,t,y2)
set(h(1),'linewidth',12)
% h(1) and h(2) are handles of plot 1 and plot 2
  2 commentaires
Mohammad
Mohammad le 31 Jan 2014
Thank you, but I'm not the one drawing the graphs, The user enters a .fig file...
Azzi Abdelmalek
Azzi Abdelmalek le 31 Jan 2014
You can get the handles h by
h=get(gca,'children')

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by