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>SetNumYTicks</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="SetNumXTicks.html" title="SetNumXTicks" /><link rel="next" href="SetOutputFile.html" title="SetOutputFile" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetNumYTicks</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetNumXTicks.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="SetOutputFile.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetNumYTicks"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetNumYTicks</span></h2><p>SetNumYTicks &#8212; Set the number of Y tick intervals</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot-&gt;SetNumYTicks([<span class="optional"><em class="parameter"><code>$nt</code></em></span>])</pre></div><div class="refsect1"><a id="idp1378426316"></a><h2>Description</h2><p>
3
<code class="function">SetNumYTicks</code> sets the number of tick intervals along
4
the Y axis.
5
You can use either this function or <a class="xref" href="SetYTickIncrement.html" title="SetYTickIncrement"><span class="refentrytitle">SetYTickIncrement</span></a>
6
(but not both) to control the tick mark spacing.
7
    </p></div><div class="refsect1"><a id="idp1378427780"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$nt</code></em></span></dt><dd><p>
8
Integer number of tick intervals.
9
If the value is omitted or an empty string, the default behavior is restored.
10
          </p></dd></dl></div></div><div class="refsect1"><a id="idp1378429332"></a><h2>Notes</h2><p>
11
<code class="function">SetNumYTicks</code> sets the number of intervals into
12
which PHPlot divides the Y data range.  If there are N intervals, there might
13
be as many as N+1 tick marks (accounting for one at each end).
14
Or, there might be N or N-1 tick marks, if a tick anchor is set with
15
<a class="xref" href="SetYTickAnchor.html" title="SetYTickAnchor"><span class="refentrytitle">SetYTickAnchor</span></a>, or if PHPlot is told to omit tick marks from
16
either end with <a class="xref" href="SetSkipBottomTick.html" title="SetSkipBottomTick"><span class="refentrytitle">SetSkipBottomTick</span></a>
17
or <a class="xref" href="SetSkipTopTick.html" title="SetSkipTopTick"><span class="refentrytitle">SetSkipTopTick</span></a>.
18
    </p><p>
19
If you use <code class="function">SetNumYTicks</code>, you will get exactly that many
20
tick intervals, regardless of whether the resulting tick increment is a
21
whole number. In general, you would only use <code class="function">SetNumYTicks</code>
22
when also using <a class="xref" href="SetPlotAreaWorld.html" title="SetPlotAreaWorld"><span class="refentrytitle">SetPlotAreaWorld</span></a> to specify both ends
23
of the Y plot range. For example:
24
      </p><pre class="programlisting">$plot-&gt;SetPlotAreaWorld(NULL, -10, NULL, 10);
25
$plot-&gt;SetNumXTicks(20);
26
</pre><p>
27
You will have a Y range from -10 to 10, with 20 intervals of 1 unit each.
28
    </p><p>
29
If neither <code class="function">SetNumYTicks</code> nor
30
<a class="xref" href="SetYTickIncrement.html" title="SetYTickIncrement"><span class="refentrytitle">SetYTickIncrement</span></a> is used, the tick interval
31
is automatically calculated by PHPlot.
32
See <a class="xref" href="adv-autorange.html#adv-autorange-tick" title="4.6.7. Automatic Tick Increment Calculation">Section 4.6.7, &#8220;Automatic Tick Increment Calculation&#8221;</a> for details.
33
    </p></div><div class="refsect1"><a id="idp1378434996"></a><h2>History</h2><p>
34
Before PHPlot-6.0.0, if neither the number of ticks nor the tick increment
35
was specified, PHPlot calculated the tick increment as 1/10 of the Y data
36
range.
37
Starting with PHPlot-6.0.0, a more complex algorithm is used which tries
38
to produce 'natural' tick increments.
39
    </p><p>
40
Starting with PHPlot-6.0.0, if you call both <code class="function">SetNumYTicks</code>
41
and <code class="function">SetYTickIncrement</code>, the tick increment has priority
42
and the specified number of ticks is ignored.
43
Before PHPlot-6.0.0, the behavior was order-dependent: whichever function
44
was used last had priority.
45
    </p><p>
46
Through PHPlot-5.3.0, the argument was required.
47
To restore the default behavior, it was necessary to use
48
<code class="literal">SetNumYTicks('')</code>.
49
Starting with PHPlot-5.3.1, the argument may be omitted to restore the
50
default behavior.
51
    </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetNumXTicks.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="SetOutputFile.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetNumXTicks </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetOutputFile</td></tr></table></div></body></html>