How to use a saved figure in an existing plot?

26 views (last 30 days)
Katie Evans
Katie Evans on 17 Mar 2022
Answered: Jon on 17 Mar 2022
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
Jon on 17 Mar 2022

Community Treasure Hunt

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

Start Hunting!