How can I put existing figures in different subplots in another figure in MATLAB 6.5 (R13)?
Show older comments
I want to make several plots, each in their own figure. I then want to create a final figure which contains subplots which have the contents of the original figures.
Accepted Answer
More Answers (1)
Eric Sargent
on 9 Dec 2020
Starting in R2019b, you can use tiledlayout to manage several axes. You can reparent each of your axes into a layout, and set the tile number of each axes as appropriate.
% Get a list of all of the open figures
figlist=get(groot,'Children');
newfig=figure;
tcl=tiledlayout(newfig,'flow')
for i = 1:numel(figlist)
figure(figlist(i));
ax=gca;
ax.Parent=tcl;
ax.Layout.Tile=i;
end
3 Comments
KAE
on 9 Dec 2020
Thanks!
Eric Sargent
on 19 Jan 2021
What do you mean by "keep the names"? What are you looking to do?
Eric Sargent
on 1 Feb 2021
Categories
Find more on Subplots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!