
Merge 3 .FIG figures into one graph
3 views (last 30 days)
Show older comments
Alberto Acri
on 3 Nov 2022
Commented: Cris LaPierre
on 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'));
0 Comments
Accepted Answer
Cris LaPierre
on 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 Comments
Cris LaPierre
on 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'));
More Answers (0)
See Also
Categories
Find more on Printing and Saving in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!