Mercurial > hg > camir-ismir2012
diff toolboxes/FullBNT-1.0.7/KPMtools/subplot3.m @ 0:cc4b1211e677 tip
initial commit to HG from
Changeset:
646 (e263d8a21543) added further path and more save "camirversion.m"
author | Daniel Wolff |
---|---|
date | Fri, 19 Aug 2016 13:07:06 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/toolboxes/FullBNT-1.0.7/KPMtools/subplot3.m Fri Aug 19 13:07:06 2016 +0200 @@ -0,0 +1,13 @@ +function fignum = subplot3(nrows, ncols, fignumBase, plotnumBase) +% function subplot3(nrows, ncols, fignumBase, plotnumBase) +% Choose a subplot number, opening a new figure if necessary +% eg nrows=2, ncols = 2, we plot on (fignum, plotnum) = (1,1), (1,2), (1,3), (1,4), (2,1), ... + +nplotsPerFig = nrows*ncols; +fignum = fignumBase + div(plotnumBase-1, nplotsPerFig); +plotnum = wrap(plotnumBase, nplotsPerFig); +figure(fignum); +if plotnum==1, clf; end +subplot(nrows, ncols, plotnum); + +