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 © 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> > <a href="#">applications</a> > <a href="index.html">common</a> > yaxesposition.m</div> |
---|
16 | |
---|
17 | <!--<table width="100%"><tr><td align="left"><a href="../../index.html"><img alt="<" border="0" src="../../left.png"> Master index</a></td> |
---|
18 | <td align="right"><a href="index.html">Index for applications/common <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> |
---|
39 | This function calls: |
---|
40 | <ul style="list-style-image:url(../../matlabicon.gif)"> |
---|
41 | </ul> |
---|
42 | This 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> |
---|
50 | 0002 <span class="comment">%YAXESPOSITION - Vertical axes scaling for all the axes in a figure</span> |
---|
51 | 0003 <span class="comment">%</span> |
---|
52 | 0004 <span class="comment">% INPUTS</span> |
---|
53 | 0005 <span class="comment">% 1. PercentChange - Percentage for scaling (1 means no change)</span> |
---|
54 | 0006 <span class="comment">%</span> |
---|
55 | 0007 <span class="comment">% See also yaxesposition</span> |
---|
56 | 0008 |
---|
57 | 0009 |
---|
58 | 0010 <span class="comment">%</span> |
---|
59 | 0011 <span class="comment">% Written by Gregory J. Portmann</span> |
---|
60 | 0012 |
---|
61 | 0013 |
---|
62 | 0014 h = get(gcf,<span class="string">'children'</span>); |
---|
63 | 0015 |
---|
64 | 0016 <span class="comment">% set(gcf, 'Units', get(0, 'Units'));</span> |
---|
65 | 0017 <span class="comment">% Pfig = get(gcf, 'Position');</span> |
---|
66 | 0018 <span class="comment">% set(gcf, 'Position', get(0, 'ScreenSize'));</span> |
---|
67 | 0019 |
---|
68 | 0020 |
---|
69 | 0021 <span class="keyword">for</span> i = 1:length(h) |
---|
70 | 0022 hget = get(h(i)); |
---|
71 | 0023 <span class="keyword">if</span> isfield(hget, <span class="string">'Position'</span>) & ~strcmpi(hget.Tag, <span class="string">'Legend'</span>) |
---|
72 | 0024 p = get(h(i), <span class="string">'Position'</span>); |
---|
73 | 0025 <span class="keyword">if</span> PercentChange > 1 |
---|
74 | 0026 Percent = PercentChange - 1; |
---|
75 | 0027 set(h(i), <span class="string">'Position'</span>, [p(1) p(2)-p(4)*Percent/2 p(3) p(4)+p(4)*Percent]); |
---|
76 | 0028 <span class="keyword">else</span> |
---|
77 | 0029 Percent = 1 - PercentChange; |
---|
78 | 0030 set(h(i), <span class="string">'Position'</span>, [p(1) p(2)+p(4)*Percent/2 p(3) p(4)-p(4)*Percent]); |
---|
79 | 0031 <span class="keyword">end</span> |
---|
80 | 0032 <span class="keyword">end</span> |
---|
81 | 0033 <span class="keyword">end</span> |
---|
82 | 0034 |
---|
83 | 0035 <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> © 2003</address> |
---|
85 | </body> |
---|
86 | </html> |
---|