Combining Two Plots into One Won't Work!
Show older comments
Hello dear experts,
I am trying to combine two figures into one, and I am using the solution already provided here, however, it is not working for me! I really appreciate it if you help me with that. Here I attached two figures as an exmaple.
This is the code that I am using:
fh1 = open('f1.fig');
fh2 = open('f2.fig');
ax1 = get(fh1, 'Children');
ax2 = get(fh2, 'Children');
ax2p = get(ax2(1),'Children');
copyobj(ax2p, ax1(1));
Accepted Answer
More Answers (1)
snr matlb
on 23 Jan 2021
0 votes
I guess that you can use "hold on" if you can draw the plot again. "hold on" holds the first plot while it is drawing the other one. If the axes are common, I think that you can use it.
Categories
Find more on Creating, Deleting, and Querying Graphics Objects 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!