%PRINTALL print all displayed plots % no arguements, simply type printall, and all open plot windows will be printed % ------ print existing plots % t=get(0,'children'); if isempty(t), disp('No existing plots to print'); else for i=1:max(t), figure(i) set(gcf, 'PaperPositionMode', 'manual'); set(gcf, 'PaperUnits', 'inches'); orient = get(gcf, 'PaperOrientation'); % make the plot fill the page if strcmp(orient, 'portrait') set(gcf, 'PaperPosition', [0.25 0.25 8 10.5]); else set(gcf, 'PaperPosition', [0.25 0.25 10.5 8]); end buf=['print -f',int2str(i),' -dwinc ']; eval(buf) disp([get(t(i),'name'), 'is printed: ']) disp(buf) end end