Multiples figures of 4x2 subplots....

4 visualizaciones (últimos 30 días)
Jules Ray
Jules Ray el 19 de Sept. de 2014
Editada: Jules Ray el 19 de Sept. de 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 comentarios
Image Analyst
Image Analyst el 19 de Sept. de 2014
Editada: Image Analyst el 19 de Sept. de 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 el 19 de Sept. de 2014
here the .mat file.... i would like aslo save each figure as a pdf, but i dont know how...

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by