Multiples figures of 4x2 subplots....

5 visualizzazioni (ultimi 30 giorni)
Jules Ray
Jules Ray il 19 Set 2014
Modificato: Jules Ray il 19 Set 2014
Hello dudes: I'm preparing a code to create mutiples figures, each one consisting of subplots. because this will be part of a GUI i created the script with loops. This is the script:
a)the total number of figures is variable and defined as (nim) b) each figure is opened and their axis copied and pasted inside each of the subplots c) beacuse each figure is diferent i preceed to define the xlim and y lim for each subplot d) i defined a standar size for the subplots, is 4x2
%%%%%%%%%%%%%%%%DONT close any figure %%%%%%%%%%%%%%%%%%%%%
%%copying and pasting active objects & creating of multiple pages
ps=8;% plots per page
np=nim; %number of plots
for it=1:np
xt=rem(it-1,ps)+1;
if xt==1
figure;
end
ax1=subplot(4,2,xt);
%title(sprintf('plot #%-1d',it));
xlim(Xll(it,:)); %xlimits, come from figure structure
ylim(Yll(it,:)); %ylimits, come from figure structure
copyobj(allchild(get(h1(it),'CurrentAxes')),ax1);
%check this
fout = sprintf('%s_DR.pdf',station);
saveas(gcf,fout,'pdf');
end
however, the script is not working it all, instead of produce new figures produces identical figures in pdf.
What is missing to do what i want???? thanx in advance
  3 Commenti
Image Analyst
Image Analyst il 19 Set 2014
Modificato: Image Analyst il 19 Set 2014
What is the purpose of the copyobj() call? And please attach CONT_fits.mat so we can run the code.
Jules Ray
Jules Ray il 19 Set 2014
here the .mat file.... i would like aslo save each figure as a pdf, but i dont know how...

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by