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>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><code class="function">TuneYAutoRange</code> is used to adjust the parameters used byPHPlot when automatically calculating the plot range along the Y axis.</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>Optional value for the Y axis <span class="emphasis"><em>zero magnet</em></span>, whichcontrols how far PHPlot will extend the plot range to include 0 if it doesn'talready include 0.This is a floating point value between 0 and 1 inclusive, where 0 disablesthe 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 Y axis range extension mode, which determines themethod PHPlot uses to extend the end of the plot range beyond the datarange. This is a single character:</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>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 Y axis range extension amount. This is a factorof the overall range by which the range is extended to leave extra room forlabels, 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="idp1379373268"></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 setwith <a class="xref" href="SetPlotAreaWorld.html" title="SetPlotAreaWorld"><span class="refentrytitle">SetPlotAreaWorld</span></a>.PHPlot also does not adjust the plot range for the Y axis in the case whereY values are implied, rather than specified, in the data array(data type <a class="link" href="conc-datatypes.html#text-data-yx">text-data-yx</a>, used withhorizontal plots).</p><p>This applies to the Y axis only, where Y is the dependent variable forvertical plots, and the independent variable for horizontal plots.See also <a class="xref" href="TuneXAutoRange.html" title="TuneXAutoRange"><span class="refentrytitle">TuneXAutoRange</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 therange calculations and parameters.</p><p>The default for the zero magnet is 6/7, which results in up to 600% rangeextension.The default adjustment mode is <code class="literal">T</code>, which forces the axisto end at a tick mark.The default adjustment amount is either 0% or 3% (0.03), depending on theplot type and whether Y is the independent or dependent variable.</p></div><div class="refsect1"><a id="idp1379377764"></a><h2>Examples</h2><p>If you want a plot with 'zero suppression' (not including zero on the Yaxis), you can disable the zero magnet as follows:</p><pre class="programlisting">$plot->TuneYAutoRange(0);</pre><p>This emphasizes small changes in large numbers.</p><p>If you want PHPlot to set the plot range to exactly the data range,with no extensions or adjustments, set the zero magnet to 0 to disable it,select adjustment mode 'R' (range only), and set the adjustment amount to 0%.Your Y axis will go from the smallest to the largest Y value in your dataarray, with no extra space on either side.</p><pre class="programlisting">$plot->TuneYAutoRange(0, 'R', 0);</pre><p></p></div><div class="refsect1"><a id="idp1379380180"></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="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>