source: MML/trunk/applications/doc_html/applications/common/yaxesposition.html @ 4

Last change on this file since 4 was 4, checked in by zhangj, 10 years ago

Initial import--MML version from SOLEIL@2013

File size: 4.3 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2                "http://www.w3.org/TR/REC-html40/loose.dtd">
3<html>
4<head>
5  <title>Description of yaxesposition</title>
6  <meta name="keywords" content="yaxesposition">
7  <meta name="description" content="YAXESPOSITION - Vertical axes scaling for all the axes in a figure">
8  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
9  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
10  <meta name="robots" content="index, follow">
11  <link type="text/css" rel="stylesheet" href="../../m2html.css">
12</head>
13<body>
14<a name="_top"></a>
15<div><a href="../../index.html">Home</a> &gt;  <a href="#">applications</a> &gt; <a href="index.html">common</a> &gt; yaxesposition.m</div>
16
17<!--<table width="100%"><tr><td align="left"><a href="../../index.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
18<td align="right"><a href="index.html">Index for applications/common&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->
19
20<h1>yaxesposition
21</h1>
22
23<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
24<div class="box"><strong>YAXESPOSITION - Vertical axes scaling for all the axes in a figure</strong></div>
25
26<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
27<div class="box"><strong>function yaxesposition(PercentChange) </strong></div>
28
29<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
30<div class="fragment"><pre class="comment">YAXESPOSITION - Vertical axes scaling for all the axes in a figure
31 
32  INPUTS
33  1. PercentChange - Percentage for scaling (1 means no change)
34
35  See also <a href="yaxesposition.html" class="code" title="function yaxesposition(PercentChange)">yaxesposition</a></pre></div>
36
37<!-- crossreference -->
38<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
39This function calls:
40<ul style="list-style-image:url(../../matlabicon.gif)">
41</ul>
42This function is called by:
43<ul style="list-style-image:url(../../matlabicon.gif)">
44</ul>
45<!-- crossreference -->
46
47
48<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
49<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function yaxesposition(PercentChange)</a>
500002 <span class="comment">%YAXESPOSITION - Vertical axes scaling for all the axes in a figure</span>
510003 <span class="comment">%</span>
520004 <span class="comment">%  INPUTS</span>
530005 <span class="comment">%  1. PercentChange - Percentage for scaling (1 means no change)</span>
540006 <span class="comment">%</span>
550007 <span class="comment">%  See also yaxesposition</span>
560008
570009
580010 <span class="comment">%</span>
590011 <span class="comment">%  Written by Gregory J. Portmann</span>
600012
610013
620014 h = get(gcf,<span class="string">'children'</span>);
630015
640016 <span class="comment">% set(gcf, 'Units', get(0, 'Units'));</span>
650017 <span class="comment">% Pfig = get(gcf, 'Position');</span>
660018 <span class="comment">% set(gcf, 'Position', get(0, 'ScreenSize'));</span>
670019     
680020
690021 <span class="keyword">for</span> i = 1:length(h)
700022     hget = get(h(i));
710023     <span class="keyword">if</span> isfield(hget, <span class="string">'Position'</span>) &amp; ~strcmpi(hget.Tag, <span class="string">'Legend'</span>)
720024         p = get(h(i), <span class="string">'Position'</span>);
730025         <span class="keyword">if</span> PercentChange &gt; 1
740026             Percent = PercentChange - 1;
750027             set(h(i), <span class="string">'Position'</span>, [p(1) p(2)-p(4)*Percent/2 p(3) p(4)+p(4)*Percent]);
760028         <span class="keyword">else</span>
770029             Percent = 1 - PercentChange;
780030             set(h(i), <span class="string">'Position'</span>, [p(1) p(2)+p(4)*Percent/2 p(3) p(4)-p(4)*Percent]);
790031         <span class="keyword">end</span>
800032     <span class="keyword">end</span>
810033 <span class="keyword">end</span>
820034
830035 <span class="comment">%set(gcf,'Position', Pfig);</span></pre></div>
84<hr><address>Generated on Mon 21-May-2007 15:32:41 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
85</body>
86</html>
Note: See TracBrowser for help on using the repository browser.