Series of subplots that are continuous through multiple figures
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
nrows = 8;
ncols = 5;
currentPlot = 1;
for i = 1:size(input,1)
subplot(nrows, ncols, currentPlot);
plot(input(i,:));
currentPlot = currentPlot + 1;
end
The size of the input is 100, so all of the subplots cannot fit into one figure. But I don't want to squeeze all of the subplots into one figure as that is somewhat overwhelming. Instead, I'd like to be able to pull up as many new figures as is required to finish running through the loop, while filling in with the next indexed subplots.
0 commentaires
Réponse acceptée
dpb
le 3 Août 2013
Modifié(e) : dpb
le 3 Août 2013
nrows = 8;
ncols = 5;
nplts=nrows*ncols;
nfigs=ceil(length(input)/nplts);
h=zeros(nplts,nfigs); % hang onto the handles...
k=1;
for j=1:nfigs
figure(j)
for i = 1:nplts
h(i,j)=subplot(nrows, ncols, i);
plot(input(k,:));
k=k+1;
end
end
To get to any given subplot use the handle array of h(plt,figure)
Aircode...test well... :)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Subplots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!