Documentation of sp_old


Global Index (all files) (short | long) | Local Index (files in subdir) (short | long)


Function Synopsis

sp(ncol, num);

Help text


  h = sp(pos);


Cross-Reference Information

This function calls

Listing of function sp_old

function sp(ncol, num);

global hsz vsz midv midh tmarg

if ncol == 1;

  pos = [0.5 - hsz/2 ...
         1 - tmarg - (num-1)*midv - num*vsz ...
         hsz vsz]; 

elseif ncol == 2;
  
  if mod(num, 2);

    pos = [0.5 - hsz - midh/2 ...
           1 - tmarg - (ceil(num/2)-1)*midv - ceil(num/2)*vsz ...
           hsz vsz];

  else

    pos = [0.5 + midh/2 ...
           1 - tmarg - (ceil(num/2)-1)*midv - ceil(num/2)*vsz ...
           hsz vsz];

  end

else

  error('Sorry, this only works for one or two column figures');

end

subplot('position', pos);
set(gca, 'box', 'on');