How do I combine 3 figures into a single plot and compare them?

7 views (last 30 days)
I have 3 temperature plots of a certain fixed setup. Each temperature plot has the same general shape, just the temperature varies as the heat generated is different for each plot. I now wish to compare them in a single plot using subplots. I tried the following: https://ch.mathworks.com/matlabcentral/answers/523200-combine-fig-files-into-1-figure
yet this is not what I need, as it only places the figures in certain subplots and since they look virtually the same, I am unable to compare them.
I hope I am making sense.
  2 Comments
Adam Danz
Adam Danz on 1 Aug 2022
Welcome to the forum Marco. Is the problem that you can't compare the different subplot or is the problem that they all look similar and you don't know which is which? If the problem is the latter, you can add titles to the subplots. Or, would you like to add all of the data into a single axes for direct comparsion?
I'm not quite sure what the goal or problem is.
Rohit
Rohit on 6 Oct 2022
Hi,
If you do not have the MATLAB code for the figures and just have the .FIG files, you can refer to the MATLAB Answers link below to help you extract data from .FIG files. Thereafter, you can follow the suggested answer by Matt J to combine 3 figures into a single plot. That should be a better way to compare the 3 temperature plots.

Sign in to comment.

Answers (1)

Matt J
Matt J on 1 Aug 2022
Edited: Matt J on 1 Aug 2022
Perhaps this is what you mean. Start with 3 plots,
colors={'r','g','m'}
colors = 1×3 cell array
{'r'} {'g'} {'m'}
for i=1:3
figure(i);
h(i)=plot((0:4)+i,colors{i}); ylim([0,5])
end; drawnow
then copy all of the lines to a common axis:
figure(4);
Hax=axes;
copyobj(h,Hax);

Community Treasure Hunt

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

Start Hunting!