FIXPAPER Makes the hard copy look like the screen. Sets the 'paperposition' so that what goes onto paper (or into the postscript file), looks just like what is on your computer screen.
0001 % FIXPAPER Makes the hard copy look like the screen. 0002 % Sets the 'paperposition' so that what goes onto paper 0003 % (or into the postscript file), looks just like what 0004 % is on your computer screen. 0005 0006 % All we do here is set the width and height of the 0007 % 'paperposition' to be the same as the width and height 0008 % of the current figure on the screen. 0009 0010 % Rich Signell 0011 un=get(gcf,'units'); 0012 pun=get(gcf,'paperunits'); 0013 set(gcf,'units','inches'); 0014 pos=get(gcf,'pos'); 0015 0016 % if figure window window > height, use landscape 0017 if(pos(3)>pos(4)), 0018 orient('landscape') 0019 else 0020 orient('portrait') 0021 end 0022 0023 % set the paperposition to the same as the figure window, 0024 % starting 1/2 inch from the bottom left hand corner of the page. 0025 0026 set(gcf, 'paperunits', 'inches', 'paperposition',[.5 .5 pos(3:4)]); 0027 0028 %reset paper units to original values 0029 set(gcf,'units',un); 0030 set(gcf,'paperunits',pun);