Just found the way to do it, using Felipe's answer on https://uk.mathworks.com/matlabcentral/answers/100687-how-do-i-extract-data-from-matlab-figures
How to use a saved figure in an existing plot?
26 views (last 30 days)
Show older comments
Hi, I have some code that processes an image and I'm saving a plot associated with each image I put through it.
I want to recompile some of the saved plots into one 3D plot so I can compare the data, so for example:
figure('Name', 'Plot'); title('Plot');
plot3(x, y, z, 'r.', 'MarkerSize', 0.3);
hold on
openfig('SavedFigure1.fig')
hold on
openfig('SavedFigure2.fig')
xlim([0 1]), xlabel('x'), ylim([0 1]), ylabel('y'), zlim([0 1]), zlabel('z');
axis square
This just opens the saved figures as two separate figures and doesn't change the plot, but I can't figure out how to get them to be included on one figure with the same axis. Any help would be much appreciated :)
Answers (1)
Jon
on 17 Mar 2022
I think this may get you what you want https://www.mathworks.com/matlabcentral/answers/3901-merging-two-figures
0 Comments
See Also
Categories
Find more on Annotations 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!