How to insert multiple figures of plots into a single figure with subplots?
Mostra commenti meno recenti
I have searched for an answer to my question but it seems that people's questions generally involve inserting multiple plots into a single plot. I would like to make my doubt perfectly clear - I want to insert multiple FIGURES of plots (or subplots) into a SINGLE FIGURE with subplots. Also, the subplots have different axis labels and scales. Here is a pictorial representation of what I am trying to achieve.
This is what I have:

This is what I want:

Can someone please help me with how to do this? Your help is much appreciated.
Thanks.
Risposta accettata
Più risposte (1)
Pugazhenthi Sivasankar
il 17 Dic 2018
0 voti
2 Commenti
Anass LAMNAOUAR
il 24 Feb 2021
hello Pugazhenthi Sivasankar,
Can you please put your script here i want to do the same thing as you.
Thank you in advance,
Daylín Góngora
il 7 Feb 2022
Modificato: Daylín Góngora
il 7 Feb 2022
PLOT 1
ax1 = gca;
PLOT 2
ax2 = gca;
...
fnew = figure;hold on;
for k = 1:6 %number of plots
if exist(['ax',num2str(k)],'var') == 1
temp = copyobj(eval(['ax',num2str(k)]),fnew);
subplot(2,3,k,temp); %update according to your desired layout
end
end
Categorie
Scopri di più su Creating, Deleting, and Querying Graphics Objects in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!