Home > atmlab > graphs > scale_print.m

scale_print

PURPOSE ^

SCALE_PRINT Resizes the print out of a figure

SYNOPSIS ^

function scale_print(scfac)

DESCRIPTION ^

 SCALE_PRINT   Resizes the print out of a figure

 FORMAT   scale_print(scfac)
        
 IN   scfac   Scaling factor (e.g. 0.5 to shrink with factor of 2)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

scale_print.m

SOURCE CODE ^

0001 % SCALE_PRINT   Resizes the print out of a figure
0002 %
0003 % FORMAT   scale_print(scfac)
0004 %
0005 % IN   scfac   Scaling factor (e.g. 0.5 to shrink with factor of 2)
0006 
0007 % 2005-01-12  Created by Patrick Eriksson.
0008 
0009 
0010 function scale_print(scfac)
0011 
0012 
0013 %=== Basic check of input
0014 %
0015 rqre_nargin( 1, nargin );
0016 
0017 
0018 h = gcf;
0019 
0020 pos = get( h, 'PaperPosition' );
0021 
0022 dx = (1-scfac) * pos(3) / 2;
0023 dy = (1-scfac) * pos(4) / 2;
0024 
0025 set( h, 'PaperPosition', [pos(1)+dx pos(2)+dy pos(3)*scfac pos(4)*scfac ] );

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005