Documentation of global_axes


Global Index (short | long) | Local contents | Local Index (short | long)


Function Synopsis

global_axes(hsz1, vsz1, midh1, midv1, tmarg1);

Help text


  global_axes(hsz, vsz, midh, midv, tmarg):  
  
  Defines parameters for a new subplot.  Input the
  following parameters (in inches):
  hsz = horizontal width
  vsz = vertical height
  midh = horizontal distance between subplots
  midv = vertical distance between subplots
  tmarg = top margin
  
  Values are scaled appropriately for the current
  figure, and global variables are set.
  
  This is commonly used with the command:  subplot2


Listing of function global_axes

function global_axes(hsz1, vsz1, midh1, midv1, tmarg1);

global HSZ VSZ TMARG MIDH MIDV

sz = get(gcf, 'PaperSize'); 
hw = 1/sz(1); vw = 1/sz(2);

if strcmp(orient, 'landscape');
  if nargin < 5; tmarg1 = 1.5; end;
  if nargin < 4; midv1 = 0.5; end;
  if nargin < 3; midh1 = 0.0; end;
  if nargin < 2; vsz1 = 2.5; end;
  if nargin == 0; hsz1 = 6; end;
else
  if nargin < 5; tmarg1 = 1.0; end;
  if nargin < 4; midv1 = 0.0; end;
  if nargin < 3; midh1 = 0.0; end;
  if nargin < 2; vsz1 = 1.5; end;
  if nargin == 0; hsz1 = 2.75; end;
end

HSZ = hsz1*hw;
VSZ = vsz1*vw;
MIDH = midh1*hw;
MIDV = midv1*vw;
TMARG = tmarg1*vw;