tiled plots on two loops without overriding the succesive figures
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I have arranged the tiled plots in the following way inside two loops so that the figures from the first loop don't over write the figures of the second loop. Is there any better way to do this? This code appears to work but I will like your opinion if there is a better way of doing this.
Is the tiledlayout and nexttile application properly applied here?
NP = 16; % 16 probes per page
[NRow, N_probe] = size(V_possible);
for k_page = 1: ceil(N_probe/NP)
screensize = get( groot, 'Screensize' );
figure('Position', screensize)
tiledlayout('flow','TileSpacing', 'Compact', 'Padding', 'Compact');
if k_page == ceil(N_probe/NP)
nplot = N_probe-NP*(k_page-1);% plots per page, last page could be less than 20
else
nplot = NP;
end
for kk= 1:nplot
nexttile(kk)
i_probe = NP*(k_page-1)+kk;
loglog(nraw1,sraw1,'-.b','LineWidth',1);
hold on
loglog(nraw2,sraw2,'-.r','LineWidth',1);
hold on
end %for kk
end %for k_page
for k_page = 1: ceil(N_probe/NP)
screensize = get( groot, 'Screensize' );
figure('Position', screensize)
tiledlayout('flow','TileSpacing', 'Compact', 'Padding', 'Compact');
if k_page == ceil(N_probe/NP)
nplot = N_probe-NP*(k_page-1);% plots per page, last page could be less than 20
else
nplot = NP;
end
for kk= 1:nplot
nexttile(kk)
i_probe = NP*(k_page-1)+kk;
loglog(nraw3,sraw3,'-.b','LineWidth',1);
hold on
loglog(nraw4,sraw4,'-.r','LineWidth',1);
hold on
end %for kk
end %for k_page
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Graphics Object Programming en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!