How can I put existing figures in different subplots in another figure in MATLAB 6.5 (R13)?
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (1)
Eric Sargent
le 9 Déc 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 commentaires
KAE
le 9 Déc 2020
Thanks!
Eric Sargent
le 19 Jan 2021
What do you mean by "keep the names"? What are you looking to do?
Eric Sargent
le 1 Fév 2021
Catégories
En savoir plus sur Subplots dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!