Subversion Repositories cheapmusic

Rev

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>SetYTickAnchor</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="SetYScaleType.html" title="SetYScaleType" /><link rel="next" href="SetYTickCrossing.html" title="SetYTickCrossing" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetYTickAnchor</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetYScaleType.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="SetYTickCrossing.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetYTickAnchor"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetYTickAnchor</span></h2><p>SetYTickAnchor &#8212; Set an anchor point for Y tick marks</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot-&gt;SetYTickAnchor([<span class="optional"><em class="parameter"><code>$yta</code></em></span>])</pre></div><div class="refsect1"><a id="idp1379237268"></a><h2>Description</h2><p>
<code class="function">SetYTickAnchor</code> sets an anchor point for Y tick marks.
This ensures that a tick mark will be placed at that value (if it is within
the plotted data range).  The effect of this function is to slide the set
of tick marks along the axis until one of them falls on the anchor.  This
also affects the position of the tick labels and Y grid lines. It does not
change the plotted data values, nor the range of values along the Y axis.
    </p></div><div class="refsect1"><a id="idp1379238636"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$yta</code></em></span></dt><dd><p>
The desired Y anchor point, in world coordinates.
If omitted or NULL, the default of not using an anchor is restored.
          </p></dd></dl></div></div><div class="refsect1"><a id="idp1379240212"></a><h2>Notes</h2><p>
By default, PHPlot will place the bottom-most tick mark at the bottom of
the Y axis range.
For example, if the Y range is -5 to 5, and the tick increment is 2, tick
marks will be placed at Y=-5, -3, -1, 1, 3, and 5.
Note that in this case there would be no tick mark at the X axis position Y=0.
    </p><p>
When using the default method of calculating and adjusting the plot range,
PHPlot will select a whole multiple of the tick increment as the bottom
of the Y plot range. Another way of looking at this is that PHPlot implicitly
anchors the Y tick marks at 0, when it calculates the range with the
default adjustment method.
If you set the plot range with <a class="xref" href="SetPlotAreaWorld.html" title="SetPlotAreaWorld"><span class="refentrytitle">SetPlotAreaWorld</span></a>, or
change the range end adjustment method, the tick marks may not be anchored
at 0 unless you use <code class="function">SetYTickAnchor(0)</code>.
More on this can be found in <a class="xref" href="adv-autorange.html" title="4.6. Plot Range and Tick Increment Calculations">Section 4.6, &#8220;Plot Range and Tick Increment Calculations&#8221;</a>.
    </p><p>
If a Y tick anchor is set, and its value is within the plotted range,
PHPlot will adjust the bottom-most tick mark so that there is a tick mark
at the Y tick anchor position.
For example, if the Y range is -5 to 5, the tick increment is 2, and the Y
tick anchor is set to 0, ticks marks will be placed at Y=-4, -2, 0, 2, and 4.
    </p><p>
The Y tick anchor need not be within the plotted range. If the tick anchor
is outside the plotted range, the tick marks will still be adjusted so that
a tick marked would be placed at the anchor if the data range was extended
to include it.
For example, if the Y range is -5 to 5, the tick increment is 2, and the Y
tick anchor is set to 10, ticks marks will still be placed at Y=-4, -2, 0, 2,
and 4 as in the previous example.
    </p><p>
See <a class="xref" href="ex-ytickanchor.html" title="5.37. Example - Setting a Y Tick Anchor">Section 5.37, &#8220;Example - Setting a Y Tick Anchor&#8221;</a> for an example of setting a Y tick anchor.
    </p></div><div class="refsect1"><a id="idp1379244684"></a><h2>History</h2><p>
This function did not change at PHPlot-6.0.0, however a new method of
automatically calculating the plot range was introduced which always
anchors the Y tick marks at 0, when using the default settings.
Therefore, <code class="function">SetYTickAnchor(0)</code> is usually no
longer needed to get a tick mark at Y=0.
In releases before PHPlot-6.0.0, <code class="function">SetYTickAnchor</code> was
usually necessary to get reasonable tick marks, unless the bottom of the Y
plot range happened to be 0, or was set to 0 or a multiple of the tick
increment.
    </p><p>
This function was added in PHPlot-5.4.0.
    </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetYScaleType.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="SetYTickCrossing.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetYScaleType </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetYTickCrossing</td></tr></table></div></body></html>