98 |
- |
1 |
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
|
|
|
2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><title>TuneYAutoRange</title><link rel="stylesheet" type="text/css" href="phplotdoc.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /><link rel="home" href="index.html" title="PHPlot Reference Manual" /><link rel="up" href="reference.html" title="PHPlot Function Reference" /><link rel="prev" href="TuneXAutoRange.html" title="TuneXAutoRange" /><link rel="next" href="TuneXAutoTicks.html" title="TuneXAutoTicks" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">TuneYAutoRange</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="TuneXAutoRange.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="TuneXAutoTicks.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="TuneYAutoRange"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">TuneYAutoRange</span></h2><p>TuneYAutoRange — Adjust tuning parameters for Y axis range calculation</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot->TuneYAutoRange([<span class="optional"><em class="parameter"><code>$zero_magnet</code></em></span>], [<span class="optional"><em class="parameter"><code>$adjust_mode</code></em></span>], [<span class="optional"><em class="parameter"><code>$adjust_amount</code></em></span>])</pre></div><div class="refsect1"><a id="idp1379362060"></a><h2>Description</h2><p>
|
|
|
3 |
<code class="function">TuneYAutoRange</code> is used to adjust the parameters used by
|
|
|
4 |
PHPlot when automatically calculating the plot range along the Y axis.
|
|
|
5 |
</p></div><div class="refsect1"><a id="idp1379363132"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$zero_magnet</code></em></span></dt><dd><p>
|
|
|
6 |
Optional value for the Y axis <span class="emphasis"><em>zero magnet</em></span>, which
|
|
|
7 |
controls how far PHPlot will extend the plot range to include 0 if it doesn't
|
|
|
8 |
already include 0.
|
|
|
9 |
This is a floating point value between 0 and 1 inclusive, where 0 disables
|
|
|
10 |
the zero magnet, and 1 requires the range be always extended to include 0.
|
|
|
11 |
See <a class="xref" href="adv-autorange.html#autorange-zero-magnet" title="4.6.4.1. Range parameter: zero_magnet">Section 4.6.4.1, “Range parameter: zero_magnet”</a> for more information.
|
|
|
12 |
</p></dd><dt><span class="term"><em class="replaceable"><code>$adjust_mode</code></em></span></dt><dd><p>
|
|
|
13 |
Optional value for the Y axis range extension mode, which determines the
|
|
|
14 |
method PHPlot uses to extend the end of the plot range beyond the data
|
|
|
15 |
range. This is a single character:
|
|
|
16 |
</p><div class="informaltable"><table summary="Y range adjust mode choices" border="1"><colgroup><col align="center" class="c1" /><col class="c2" /></colgroup><thead><tr><th align="center">Mode</th><th>Description</th></tr></thead><tbody><tr><td align="center">T</td><td>
|
|
|
17 |
Tick : extend the range, then to the next tick mark.
|
|
|
18 |
</td></tr><tr><td align="center">R</td><td>
|
|
|
19 |
Range : extend the range.
|
|
|
20 |
</td></tr><tr><td align="center">I</td><td>
|
|
|
21 |
Integer : extend the range, then to the next integer value.
|
|
|
22 |
</td></tr></tbody></table></div><p>
|
|
|
23 |
See <a class="xref" href="adv-autorange.html#autorange-adjust-mode" title="4.6.4.2. Range parameter: adjust_mode">Section 4.6.4.2, “Range parameter: adjust_mode”</a> for more information.
|
|
|
24 |
</p></dd><dt><span class="term"><em class="replaceable"><code>$adjust_amount</code></em></span></dt><dd><p>
|
|
|
25 |
Optional value for the Y axis range extension amount. This is a factor
|
|
|
26 |
of the overall range by which the range is extended to leave extra room for
|
|
|
27 |
labels, plot markers, etc.
|
|
|
28 |
See the <a class="xref" href="adv-autorange.html#autorange-adjust-amount" title="4.6.4.3. Range parameter: adjust_amount">Section 4.6.4.3, “Range parameter: adjust_amount”</a> for more information.
|
|
|
29 |
</p></dd></dl></div></div><div class="refsect1"><a id="idp1379373268"></a><h2>Notes</h2><p>
|
|
|
30 |
Specifying <code class="literal">NULL</code>, or omitting trailing unused parameters,
|
|
|
31 |
results in no change to that parameter.
|
|
|
32 |
</p><p>
|
|
|
33 |
PHPlot does not calculate or adjust ends of the plot range which are set
|
|
|
34 |
with <a class="xref" href="SetPlotAreaWorld.html" title="SetPlotAreaWorld"><span class="refentrytitle">SetPlotAreaWorld</span></a>.
|
|
|
35 |
PHPlot also does not adjust the plot range for the Y axis in the case where
|
|
|
36 |
Y values are implied, rather than specified, in the data array
|
|
|
37 |
(data type <a class="link" href="conc-datatypes.html#text-data-yx">text-data-yx</a>, used with
|
|
|
38 |
horizontal plots).
|
|
|
39 |
</p><p>
|
|
|
40 |
This applies to the Y axis only, where Y is the dependent variable for
|
|
|
41 |
vertical plots, and the independent variable for horizontal plots.
|
|
|
42 |
See also <a class="xref" href="TuneXAutoRange.html" title="TuneXAutoRange"><span class="refentrytitle">TuneXAutoRange</span></a>.
|
|
|
43 |
</p><p>
|
|
|
44 |
See <a class="xref" href="adv-autorange.html#adv-autorange-range" title="4.6.3. Automatic Range Calculation">Section 4.6.3, “Automatic Range Calculation”</a> for more information on the
|
|
|
45 |
range calculations and parameters.
|
|
|
46 |
</p><p>
|
|
|
47 |
The default for the zero magnet is 6/7, which results in up to 600% range
|
|
|
48 |
extension.
|
|
|
49 |
The default adjustment mode is <code class="literal">T</code>, which forces the axis
|
|
|
50 |
to end at a tick mark.
|
|
|
51 |
The default adjustment amount is either 0% or 3% (0.03), depending on the
|
|
|
52 |
plot type and whether Y is the independent or dependent variable.
|
|
|
53 |
</p></div><div class="refsect1"><a id="idp1379377764"></a><h2>Examples</h2><p>
|
|
|
54 |
If you want a plot with 'zero suppression' (not including zero on the Y
|
|
|
55 |
axis), you can disable the zero magnet as follows:
|
|
|
56 |
</p><pre class="programlisting">$plot->TuneYAutoRange(0);
|
|
|
57 |
</pre><p>
|
|
|
58 |
This emphasizes small changes in large numbers.
|
|
|
59 |
</p><p>
|
|
|
60 |
If you want PHPlot to set the plot range to exactly the data range,
|
|
|
61 |
with no extensions or adjustments, set the zero magnet to 0 to disable it,
|
|
|
62 |
select adjustment mode 'R' (range only), and set the adjustment amount to 0%.
|
|
|
63 |
Your Y axis will go from the smallest to the largest Y value in your data
|
|
|
64 |
array, with no extra space on either side.
|
|
|
65 |
</p><pre class="programlisting">$plot->TuneYAutoRange(0, 'R', 0);
|
|
|
66 |
</pre><p>
|
|
|
67 |
</p></div><div class="refsect1"><a id="idp1379380180"></a><h2>History</h2><p>
|
|
|
68 |
This function was added in PHPlot-6.0.0.
|
|
|
69 |
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="TuneXAutoRange.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="TuneXAutoTicks.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">TuneXAutoRange </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> TuneXAutoTicks</td></tr></table></div></body></html>
|