Global Index (all files) (short | long) | Local Index (files in subdir) (short | long)
sp(ncol, num);
h = sp(nCol, thisPlot); nCol = number of columns to be produced thisPlot = the subplot number This routine produces subplots sized and positioned according to the dimensions specified by global_axes. This is helpful for producing actual-sized figures (e.g., for publications). See also: global_axes, subplot
| This function calls | This function is called by |
|---|---|
function sp(ncol, num);
global HSZ VSZ MIDV MIDH TMARG
pos = [0.5 - (ncol/2)*HSZ - (ncol-1)*MIDH/2 + ...
mod(num-1,ncol)*(HSZ+MIDH) ...
1 - TMARG - (ceil(num/ncol)-1)*MIDV - ceil(num/ncol)*VSZ ...
HSZ VSZ];
if isreal(sqrt([pos(1:2) pos(1:2)+pos(3:4)]));
subplot('position', pos);
set(gca, 'box', 'on');
else
er = ['The subplot is outside the figure limits.'];
error(er);
end