How I do overlay 2 Matlab fig files?

20 vues (au cours des 30 derniers jours)
Struggling in MATLAB
Struggling in MATLAB le 13 Mar 2023
Commenté : Voss le 14 Mar 2023
I have 2 .fig files I want to overlay. Only difference between them is the trajectory line. I want to keep the legends same in the overlay figures as in the individual figures. I have attached the .fig files. How should I do it?

Réponse acceptée

Voss
Voss le 13 Mar 2023
f1 = openfig('trajectory id_88092.fig');
f2 = openfig('trajectory id_90788.fig');
leg = findall(f2,'Type','legend');
leg.AutoUpdate = 'off';
ln = findall(f1,'Type','line');
ax = findall(f2,'Type','axes');
ln_copy = copyobj(ln,ax);
uistack(ln_copy,'bottom')
  2 commentaires
Struggling in MATLAB
Struggling in MATLAB le 14 Mar 2023
Thank you! It worked perfectly.
Voss
Voss le 14 Mar 2023
You're welcome!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Graphics Object Identification dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by