wysiwyg.m (700B)
1 function wysiwyg 2 % WYSIWYG -- Resize figure on screen according to papersize. 3 % 4 % This function is called with no args and merely 5 % changes the size of the figure on the screen to equal 6 % the size of the figure that would be printed, 7 % according to the papersize attribute. Use this function 8 % to give a more accurate picture of what will be 9 % printed. 10 11 % Dan(K) Braithwaite, Dept. of Hydrology U.of.A 11/93 12 13 unis = get(gcf,'units'); 14 ppos = get(gcf,'paperposition'); 15 set(gcf,'units',get(gcf,'paperunits')); 16 pos = get(gcf,'position'); 17 pos(3:4) = ppos(3:4); 18 % pos(1:2) = [1 1]; 19 set(gcf,'position',pos); 20 set(gcf,'units',unis); 21