Subversion Repositories cheapmusic

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
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>SetXTickAnchor</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="SetXScaleType.html" title="SetXScaleType" /><link rel="next" href="SetXTickCrossing.html" title="SetXTickCrossing" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetXTickAnchor</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetXScaleType.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="SetXTickCrossing.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetXTickAnchor"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetXTickAnchor</span></h2><p>SetXTickAnchor &#8212; Set an anchor point for X tick marks</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot-&gt;SetXTickAnchor([<span class="optional"><em class="parameter"><code>$xta</code></em></span>])</pre></div><div class="refsect1"><a id="idp1379021020"></a><h2>Description</h2><p>
3
<code class="function">SetXTickAnchor</code> sets an anchor point for X tick marks.
4
This ensures that a tick mark will be placed at that value (if it is within
5
the plotted data range).  The effect of this function is to slide the set
6
of tick marks along the axis until one of them falls on the anchor.  This
7
also affects the position of the tick labels and X grid lines. It does not
8
change the plotted data values, nor the range of values along the X axis.
9
    </p></div><div class="refsect1"><a id="idp1379022388"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$xta</code></em></span></dt><dd><p>
10
The desired X anchor point, in world coordinates.
11
If omitted or NULL, the default of not using an anchor is restored.
12
          </p></dd></dl></div></div><div class="refsect1"><a id="idp1379023964"></a><h2>Notes</h2><p>
13
By default, PHPlot will place the left-most tick mark at the left end of
14
the X axis range.
15
For example, if the X range is -5 to 5, and the tick increment is 2, tick
16
marks will be placed at X=-5, -3, -1, 1, 3, and 5.
17
Note that in this case there would be no tick mark at the Y axis position X=0.
18
    </p><p>
19
When using the default method of calculating and adjusting the plot range,
20
PHPlot will select a whole multiple of the tick increment as the left end
21
of the X plot range. Another way of looking at this is that PHPlot implicitly
22
anchors the X tick marks at 0, when it calculates the range with the
23
default adjustment method.
24
If you set the plot range with <a class="xref" href="SetPlotAreaWorld.html" title="SetPlotAreaWorld"><span class="refentrytitle">SetPlotAreaWorld</span></a>, or
25
change the range end adjustment method, the tick marks may not be anchored
26
at 0 unless you use <code class="function">SetXTickAnchor(0)</code>.
27
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>.
28
    </p><p>
29
If an X tick anchor is set, and its value is within the plotted range,
30
PHPlot will adjust the left-most tick mark so that there is a tick mark
31
at the X tick anchor position.
32
For example, if the X range is -5 to 5, the tick increment is 2, and the X
33
tick anchor is set to 0, ticks marks will be placed at X=-4, -2, 0, 2, and 4.
34
    </p><p>
35
The X tick anchor need not be within the plotted range. If the tick anchor
36
is outside the plotted range, the tick marks will still be adjusted so that
37
a tick marked would be placed at the anchor if the data range was extended
38
to include it.
39
For example, if the X range is -5 to 5, the tick increment is 2, and the X
40
tick anchor is set to 10, ticks marks will still be placed at X=-4, -2, 0, 2,
41
and 4 as in the previous example.
42
    </p><p>
43
See <a class="xref" href="ex-xtickanchor.html" title="5.38. Example - Hourly Data Using X Tick Anchor">Section 5.38, &#8220;Example - Hourly Data Using X Tick Anchor&#8221;</a> for an example of setting an X tick anchor.
44
    </p></div><div class="refsect1"><a id="idp1379028796"></a><h2>History</h2><p>
45
This function did not change at PHPlot-6.0.0, however a new method of
46
automatically calculating the plot range was introduced which always
47
anchors the X tick marks at 0, when using the default settings.
48
Therefore, <code class="function">SetXTickAnchor(0)</code> is usually no
49
longer needed to get a tick mark at X=0.
50
In releases before PHPlot-6.0.0, <code class="function">SetXTickAnchor</code> was
51
usually necessary to get reasonable tick marks, unless the left end of the X
52
plot range happened to be 0, or was set to 0 or a multiple of the tick
53
increment.
54
    </p><p>
55
This function was added in PHPlot-5.4.0.
56
    </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetXScaleType.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="SetXTickCrossing.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetXScaleType </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetXTickCrossing</td></tr></table></div></body></html>