84 lines
4.0 KiB
HTML
84 lines
4.0 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<title>Description of my_subplot</title>
|
|
<meta name="keywords" content="my_subplot">
|
|
<meta name="description" content="spreads subplots on several figures according to a maximum number of">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<meta name="generator" content="m2html © 2003 Guillaume Flandin">
|
|
<meta name="robots" content="index, follow">
|
|
<link type="text/css" rel="stylesheet" href="../m2html.css">
|
|
</head>
|
|
<body>
|
|
<a name="_top"></a>
|
|
<div><a href="../index.html">Home</a> > <a href="index.html">.</a> > my_subplot.m</div>
|
|
|
|
<!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png"> Master index</a></td>
|
|
<td align="right"><a href="index.html">Index for . <img alt=">" border="0" src="../right.png"></a></td></tr></table>-->
|
|
|
|
<h1>my_subplot
|
|
</h1>
|
|
|
|
<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
|
|
<div class="box"><strong>spreads subplots on several figures according to a maximum number of</strong></div>
|
|
|
|
<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
|
|
<div class="box"><strong>function my_subplot(i,imax,irow,icol,fig_title) </strong></div>
|
|
|
|
<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
|
|
<div class="fragment"><pre class="comment"> spreads subplots on several figures according to a maximum number of
|
|
subplots per figure
|
|
|
|
INPUTS
|
|
i: subplot number
|
|
imax: total number of subplots
|
|
irow: maximum number of rows in a figure
|
|
icol: maximum number of columns in a figure
|
|
fig_title: title to be repeated on each figure</pre></div>
|
|
|
|
<!-- crossreference -->
|
|
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
|
|
This function calls:
|
|
<ul style="list-style-image:url(../matlabicon.gif)">
|
|
</ul>
|
|
This function is called by:
|
|
<ul style="list-style-image:url(../matlabicon.gif)">
|
|
<li><a href="check_mh.html" class="code" title="function check_mh(fname)">check_mh</a> </li></ul>
|
|
<!-- crossreference -->
|
|
|
|
|
|
<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
|
|
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function my_subplot(i,imax,irow,icol,fig_title)</a>
|
|
0002 <span class="comment">% spreads subplots on several figures according to a maximum number of</span>
|
|
0003 <span class="comment">% subplots per figure</span>
|
|
0004 <span class="comment">%</span>
|
|
0005 <span class="comment">% INPUTS</span>
|
|
0006 <span class="comment">% i: subplot number</span>
|
|
0007 <span class="comment">% imax: total number of subplots</span>
|
|
0008 <span class="comment">% irow: maximum number of rows in a figure</span>
|
|
0009 <span class="comment">% icol: maximum number of columns in a figure</span>
|
|
0010 <span class="comment">% fig_title: title to be repeated on each figure</span>
|
|
0011 nfig_max = irow*icol;
|
|
0012 <span class="keyword">if</span> imax < nfig_max
|
|
0013 icol = ceil(sqrt(imax));
|
|
0014 irow=icol;
|
|
0015 <span class="keyword">if</span> (icol-1)*(icol-2) >= imax
|
|
0016 irow = icol-2;
|
|
0017 icol = icol-1;
|
|
0018 <span class="keyword">elseif</span> (icol)*(icol-2) >= imax
|
|
0019 irow = icol-2;
|
|
0020 <span class="keyword">elseif</span> icol*(icol-1) >= imax
|
|
0021 irow = icol-1;
|
|
0022 <span class="keyword">end</span>
|
|
0023 <span class="keyword">end</span>
|
|
0024
|
|
0025 i1 = mod(i-1,nfig_max);
|
|
0026 <span class="keyword">if</span> i1 == 0
|
|
0027 figure(<span class="string">'Name'</span>,fig_title);
|
|
0028 <span class="keyword">end</span>
|
|
0029
|
|
0030 subplot(irow,icol,i1+1);</pre></div>
|
|
<hr><address>Generated on Fri 16-Jun-2006 09:09:06 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> © 2003</address>
|
|
</body>
|
|
</html> |