SET_AXES Properties of axes objects. The function sets any property of axes objects. The properties are applied to the given handles and their childrens (all generations, see *children*). To set the fontsize used to number axes to 10 for all plots of a figure: set_axes( gcf, 'FontSize', 10 ); See also *set_labels* and *set_title*. FORMAT set_axes(h,varargin) IN h Handle to a figure, or figure objects. Arbitrary number of property / property value pairs.
0001 % SET_AXES Properties of axes objects. 0002 % 0003 % The function sets any property of axes objects. The properties are 0004 % applied to the given handles and their childrens (all generations, 0005 % see *children*). To set the fontsize used to number axes to 10 for 0006 % all plots of a figure: 0007 % set_axes( gcf, 'FontSize', 10 ); 0008 % 0009 % See also *set_labels* and *set_title*. 0010 % 0011 % FORMAT set_axes(h,varargin) 0012 % 0013 % IN h Handle to a figure, or figure objects. 0014 % Arbitrary number of property / property value pairs. 0015 0016 % 2002-12-13 Created by Patrick Eriksson. 0017 0018 0019 function set_axes(h,varargin) 0020 0021 0022 %=== Check input 0023 % 0024 rqre_nargin( 1, nargin ); 0025 % 0026 if ~isvector( h ) 0027 error('The argument *h* must be a numeric vector.'); 0028 end 0029 % 0030 if ~iseven( length(varargin) ) 0031 error('Input be pairs of property and its value.'); 0032 end 0033 0034 0035 %=== Append given handle(s) and children 0036 % 0037 h = [ h; children( h ) ]; 0038 0039 0040 %=== Loop handles and scale all possible text 0041 % 0042 for ih = 1 : length( h ) 0043 0044 if strcmp( get( h(ih), 'type' ), 'axes' ) 0045 0046 set( h(ih), varargin{:} ); 0047 0048 end 0049 0050 end