Matlab Help Index Technical Documentation Index

subplot_lookup

NAME ^

subplot_lookup - determine the subplot parameters for a particular numCond

SYNOPSIS ^

function [rowNum, colNum] = subplot_lookup(numCond)

DESCRIPTION ^

 subplot_lookup - determine the subplot parameters for a particular numCond

 Usage: [rowNum colNum] = subplot_lookup(numCond)

 In order to provide an aesthetically pleasing subplot arrangement, the
 number of subplot rows and columns must be based on the number of conditions.
 Perhaps there is a mathematical way to calculate this, but it is easier and
 faster to simply create a lookup table.

 This function is part of froi, available from http://froi.sourceforge.net, 
 and is goverened under the terms of the Artistic License.
 
 $Id: subplot_lookup.m,v 1.2 2003/09/23 15:38:19 nknouf Exp $

CROSS-REFERENCE INFORMATION ^

This function calls:

This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function [rowNum, colNum] = subplot_lookup(numCond)
0002 % subplot_lookup - determine the subplot parameters for a particular numCond
0003 %
0004 % Usage: [rowNum colNum] = subplot_lookup(numCond)
0005 %
0006 % In order to provide an aesthetically pleasing subplot arrangement, the
0007 % number of subplot rows and columns must be based on the number of conditions.
0008 % Perhaps there is a mathematical way to calculate this, but it is easier and
0009 % faster to simply create a lookup table.
0010 %
0011 % This function is part of froi, available from http://froi.sourceforge.net,
0012 % and is goverened under the terms of the Artistic License.
0013 %
0014 % $Id: subplot_lookup.m,v 1.2 2003/09/23 15:38:19 nknouf Exp $
0015 
0016 switch numCond,
0017     case 1,
0018         rowNum = 1;
0019         colNum = 1;
0020     case 2,
0021         rowNum = 1;
0022         colNum = 2;
0023     case 3,
0024         rowNum = 2;
0025         colNum = 2;
0026     case 4,
0027         rowNum = 2;
0028         colNum = 2;
0029     case 5,
0030         rowNum = 2;
0031         colNum = 3;
0032     case 6,
0033         rowNum = 2;
0034         colNum = 3;
0035     case 7,
0036         rowNum = 2;
0037         colNum = 4;
0038     case 8,
0039         rowNum = 2;
0040         colNum = 4;
0041     case 9,
0042         rowNum = 3;
0043         colNum = 3;
0044     case 10,
0045         rowNum = 3;
0046         colNum = 4;
0047     case 11,
0048         rowNum = 3;
0049         colNum = 4;
0050     case 12,
0051         rowNum = 3;
0052         colNum = 4;
0053     otherwise,
0054         rowNum = 1;
0055         colNum = 1;
0056 end
0057 
0058 return;

Generated at 19:47:41 15-Oct-2003 by m2html © 2003