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>TuneXAutoTicks</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="TuneYAutoRange.html" title="TuneYAutoRange" /><link rel="next" href="TuneYAutoTicks.html" title="TuneYAutoTicks" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">TuneXAutoTicks</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="TuneYAutoRange.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n
" href="TuneYAutoTicks.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="TuneXAutoTicks"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">TuneXAutoTicks</span></h2><p>TuneXAutoTicks — Adjust tuning parameters for X axis tick increment calculation</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot->TuneXAutoTicks([<span class="optional"><em class="parameter"><code>$min_ticks</code></em></span>], [<span class="optional"><em class="parameter"><code>$tick_mode</code></em></span>], [<span class="optional"><em class="parameter"><code>$tick_inc_integer</code></em></span>])</pre></div><div class="refsect1"><a id="idp1379384108"></a><h2>Description</h2><p>
<code class="function">TuneXAutoTicks</code> is used to adjust the parameters used by
PHPlot when automatically calculating the tick increment along the X axis.
</p></div><div class="refsect1"><a id="idp1379385180"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$min_ticks</code></em></span></dt><dd><p>
Sets the minimum number of tick intervals along the X axis.
This is an integer greater than zero.
See <a class="xref" href="adv-autorange.html#autotick-min-ticks" title="4.6.8.1. Tick Increment parameter: min_ticks">Section 4.6.8.1, “Tick Increment parameter: min_ticks”</a> for more information.
</p></dd><dt><span class="term"><em class="replaceable"><code>$tick_mode</code></em></span></dt><dd><p>
Selects from one of three available modes for calculating the tick increment
along the X axis:
</p><div class="informaltable"><table summary="X axis tick modes" border="1"><colgroup><col class="c1" /><col class="c2" /></colgroup><thead><tr><th>Mode</th><th>Description</th></tr></thead><tbody><tr><td>decimal</td><td>Use a power of 10 times 1, 2, or 5</td></tr><tr><td>binary</td><td>Use a power of 2</td></tr><tr><td>date</td><td>Use a date/time value</td></tr></tbody></table></div><p>
See <a class="xref" href="adv-autorange.html#autotick-mode" title="4.6.8.2. Tick Increment parameter: tick_mode">Section 4.6.8.2, “Tick Increment parameter: tick_mode”</a> for more information.
</p></dd><dt><span class="term"><em class="replaceable"><code>$tick_inc_integer</code></em></span></dt><dd><p>
If TRUE, forces PHPlot to pick a whole number (integer) tick increment.
If FALSE, allows fractional tick increments.
See the <a class="xref" href="adv-autorange.html#autotick-tick-inc-integer" title="4.6.8.3. Tick Increment parameter: tick_inc_integer">Section 4.6.8.3, “Tick Increment parameter: tick_inc_integer”</a> for more information.
</p></dd></dl></div></div><div class="refsect1"><a id="idp1379394700"></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>
If the tick increment is set with <a class="xref" href="SetXTickIncrement.html" title="SetXTickIncrement"><span class="refentrytitle">SetXTickIncrement</span></a> or
indirectly with <a class="xref" href="SetNumXTicks.html" title="SetNumXTicks"><span class="refentrytitle">SetNumXTicks</span></a>, then PHPlot does not need
to calculate the tick increment, and the parameters set with
<code class="function">TuneXAutoTicks</code> are not used.
</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="TuneYAutoTicks.html" title="TuneYAutoTicks"><span class="refentrytitle">TuneYAutoTicks</span></a>.
</p><p>
See <a class="xref" href="adv-autorange.html#adv-autorange-tick" title="4.6.7. Automatic Tick Increment Calculation">Section 4.6.7, “Automatic Tick Increment Calculation”</a> for more information on the
tick increment calculations and parameters.
</p><p>
The default for <code class="literal">min_ticks</code> is 8.
The maximum number of tick intervals is about 2.5 times the minimum number.
</p><p>
The default for <code class="literal">tick_mode</code> depends on the label formatting
type along the X axis. If <a class="xref" href="SetXLabelType.html" title="SetXLabelType"><span class="refentrytitle">SetXLabelType</span></a>('time') is used to
select date/time formatting of labels, then the default for tick_mode is
<code class="literal">'date'</code>, otherwise it is <code class="literal">'decimal'</code>.
</p><p>
The default for <code class="literal">tick_inc_integer</code> is FALSE, meaning PHPlot
may use fractional tick increments. (Note this does not mean a tick
increment such as 2.5 would ever be selected. PHPlot uses whole numbers
above 1 and fractional increments between 0 and 1.)
</p></div><div class="refsect1"><a id="idp1379401716"></a><h2>Example</h2><p>
Use a minimum of 10 tick intervals along the X axis, and do not allow tick
increments less than 1:
</p><pre class="programlisting">$plot->TuneXAutoRange(10, NULL, TRUE);
</pre><p>
</p></div><div class="refsect1"><a id="idp1379402844"></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="TuneYAutoRange.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="TuneYAutoTicks.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">TuneYAutoRange </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> TuneYAutoTicks</td></tr></table></div></body></html>