Merge 3 .FIG figures into one graph

8 vues (au cours des 30 derniers jours)
Alberto Acri
Alberto Acri le 3 Nov 2022
Commenté : Cris LaPierre le 3 Nov 2022
I want to combine these 3 .fig figures into a single graph. How can I do this? I have tried in the following way but I do not get the desired result.
fig1 = openfig("fig1.fig");
fig2 = openfig("fig2.fig");
fig3 = openfig("fig3.fig");
L = findobj(fig1,'type','line');
copyobj(L,findobj(fig2,'type','axes'));

Réponse acceptée

Cris LaPierre
Cris LaPierre le 3 Nov 2022
Your code works for me (a modified to also add fig3 to fig2), and does what I would expect. If this is not the desired result, please provide more details on why or why not.
  2 commentaires
Alberto Acri
Alberto Acri le 3 Nov 2022
@Cris LaPierre Can you write the code you used to represent all 3 .figs?
Cris LaPierre
Cris LaPierre le 3 Nov 2022
fig1 = openfig("fig1.fig");
fig2 = openfig("fig2.fig");
fig3 = openfig("fig3.fig");
L = findobj(fig1,'type','line');
copyobj(L,findobj(fig2,'type','axes'));
L2 = findobj(fig3,'type','line');
copyobj(L2,findobj(fig2,'type','axes'));

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by