Multiples figures of 4x2 subplots....

3 ビュー (過去 30 日間)
Jules Ray
Jules Ray 2014 年 9 月 19 日
編集済み: Jules Ray 2014 年 9 月 19 日
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 件のコメント
Image Analyst
Image Analyst 2014 年 9 月 19 日
編集済み: Image Analyst 2014 年 9 月 19 日
What is the purpose of the copyobj() call? And please attach CONT_fits.mat so we can run the code.
Jules Ray
Jules Ray 2014 年 9 月 19 日
here the .mat file.... i would like aslo save each figure as a pdf, but i dont know how...

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSubplots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by