Blame | Last modification | View Log | RSS feed
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!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>TuneXAutoRange</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="StartStream.html" title="StartStream" /><link rel="next" href="TuneYAutoRange.html" title="TuneYAutoRange" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">TuneXAutoRange</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="StartStream.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="T
uneYAutoRange.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="TuneXAutoRange"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">TuneXAutoRange</span></h2><p>TuneXAutoRange — Adjust tuning parameters for X axis range calculation</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot->TuneXAutoRange([<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="idp1379341212"></a><h2>Description</h2><p>
<code class="function">TuneXAutoRange</code> is used to adjust the parameters used by
PHPlot when automatically calculating the plot range along the X axis.
</p></div><div class="refsect1"><a id="idp1379342284"></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>
Optional value for the X axis <span class="emphasis"><em>zero magnet</em></span>, which
controls how far PHPlot will extend the plot range to include 0 if it doesn't
already include 0.
This is a floating point value between 0 and 1 inclusive, where 0 disables
the zero magnet, and 1 requires the range be always extended to include 0.
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.
</p></dd><dt><span class="term"><em class="replaceable"><code>$adjust_mode</code></em></span></dt><dd><p>
Optional value for the X axis range extension mode, which determines the
method PHPlot uses to extend the end of the plot range beyond the data
range. This is a single character:
</p><div class="informaltable"><table summary="X 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>
Tick : extend the range, then to the next tick mark.
</td></tr><tr><td align="center">R</td><td>
Range : extend the range.
</td></tr><tr><td align="center">I</td><td>
Integer : extend the range, then to the next integer value.
</td></tr></tbody></table></div><p>
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.
</p></dd><dt><span class="term"><em class="replaceable"><code>$adjust_amount</code></em></span></dt><dd><p>
Optional value for the X axis range extension amount. This is a factor
of the overall range by which the range is extended to leave extra room for
labels, plot markers, etc.
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.
</p></dd></dl></div></div><div class="refsect1"><a id="idp1379352548"></a><h2>Notes</h2><p>
Specifying <code class="literal">NULL</code>, or omitting trailing unused parameters,
results in no change to that parameter.
</p><p>
PHPlot does not calculate or adjust ends of the plot range which are set
with <a class="xref" href="SetPlotAreaWorld.html" title="SetPlotAreaWorld"><span class="refentrytitle">SetPlotAreaWorld</span></a>.
PHPlot also does not adjust the plot range for the X axis in the case where
X values are implied, rather than specified, in the data array
(data type <a class="link" href="conc-datatypes.html#text-data">text-data</a>, used with
vertical plots).
</p><p>
This applies to the X axis only, where X is the independent variable for
vertical plots, and the dependent variable for horizontal plots.
See also <a class="xref" href="TuneYAutoRange.html" title="TuneYAutoRange"><span class="refentrytitle">TuneYAutoRange</span></a>.
</p><p>
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
range calculations and parameters.
</p><p>
The default for the zero magnet is 6/7, which results in up to 600% range
extension.
The default adjustment mode is <code class="literal">T</code>, which forces the axis
to end at a tick mark.
The default adjustment amount is either 0% or 3% (0.03), depending on the
plot type and whether X is the independent or dependent variable.
</p></div><div class="refsect1"><a id="idp1379357020"></a><h2>Example</h2><p>
If you do not want PHPlot to extend your X axis to include zero, even if it
is relatively close, set the zero magnet to 0 to disable it.
</p><pre class="programlisting">$plot->TuneXAutoRange(0);
</pre><p>
</p></div><div class="refsect1"><a id="idp1379358108"></a><h2>History</h2><p>
This function was added in PHPlot-6.0.0.
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="StartStream.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="TuneYAutoRange.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">StartStream </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> TuneYAutoRange</td></tr></table></div></body></html>