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

4 views (last 30 days)
Marco Bozic on 29 Jul 2022
Edited: Matt J on 1 Aug 2022
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.
##### 1 CommentShowHide None
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.

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); 