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>SetPlotAreaWorld</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="SetPlotAreaPixels.html" title="SetPlotAreaPixels" /><link rel="next" href="SetPlotBgColor.html" title="SetPlotBgColor" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetPlotAreaWorld</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetPlotAreaPixels.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="SetPlotBgColor.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetPlotAreaWorld"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetPlotAreaWorld</span></h2><p>SetPlotAreaWorld &#8212; Override automatic data scaling to device coordinates</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot-&gt;SetPlotAreaWorld([<span class="optional"><em class="parameter"><code>$xmin</code></em></span>], [<span class="optional"><em class="parameter"><code>$ymin</code></em></span>], [<span class="optional"><em class="parameter"><code>$xmax</code></em></span>], [<span class="optional"><em class="parameter"><code>$ymax</code></em></span>])</pre></div><div class="refsect1"><a id="idp1378576204"></a><h2>Description</h2><p>
3
<code class="function">SetPlotAreaWorld</code> changes the range for World Coordinate
4
space. This is the coordinate space of the data to be plotted, and is
5
translated and scaled to fit into the Device Coordinate space of the image.
6
By default, PHPlot defines the world coordinate space based on the actual limits
7
of the data to be plotted. By using SetPlotAreaWorld, you can override one or
8
more of the calculated limits. Each parameter you specify overrides
9
the corresponding calculated limit. Each defaulted or NULL parameter is
10
ignored and the calculated limit is used.
11
    </p></div><div class="refsect1"><a id="idp1378577684"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$xmin</code></em></span></dt><dd><p>
12
Optional argument specifying the desired X data range minimum value.
13
If omitted or NULL, the value is calculated from the actual plot data.
14
          </p></dd><dt><span class="term"><em class="replaceable"><code>$ymin</code></em></span></dt><dd><p>
15
Optional argument specifying the desired Y data range minimum value.
16
If omitted or NULL, the value is calculated from the actual plot data.
17
          </p></dd><dt><span class="term"><em class="replaceable"><code>$xmax</code></em></span></dt><dd><p>
18
Optional argument specifying the desired X data range maximum value.
19
If omitted or NULL, the value is calculated from the actual plot data.
20
          </p></dd><dt><span class="term"><em class="replaceable"><code>$ymax</code></em></span></dt><dd><p>
21
Optional argument specifying the desired Y data range maximum value.
22
If omitted or NULL, the value is calculated from the actual plot data.
23
          </p></dd></dl></div></div><div class="refsect1"><a id="idp1378582308"></a><h2>Notes</h2><p>
24
Trailing defaulted arguments can be omitted, but non-trailing defaulted
25
arguments must be specified as NULL. For example, to set the minimum X
26
value to 10, the maximum X value to 100, and default the Y scaling, you can
27
use:
28
      </p><pre class="programlisting">$plot-&gt;SetPlotAreaWorld(10, NULL, 100);
29
</pre><p>
30
    </p><p>
31
This function has no effect with pie charts, because they do not use world
32
coordinates.
33
    </p><p>
34
See <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> for more information about how PHPlot
35
calculates the limits of the World Coordinate space in the absence of values
36
set with <code class="function">SetPlotAreaWorld</code>.
37
    </p></div><div class="refsect1"><a id="idp1378584932"></a><h2>History</h2><p>
38
Starting with PHPlot-6.0.0, <code class="function">SetPlotAreaWorld</code> will
39
stop with an error if a fully specified range is invalid. That is, if
40
both $xmin and $xmax are given and not NULL, $xmin must be less than $xmax.
41
If both $ymin and $ymax are given and not NULL, $ymin must be less than $ymax.
42
In older versions, this error was not detected.
43
    </p><p>
44
<code class="function">SetPlotAreaPixels</code> and <code class="function">SetPlotAreaWorld</code>
45
can be called in either order.
46
Through PHPlot-5.0.4 this was because SetPlotAreaWorld would
47
reset the scale factors if <a class="xref" href="SetPlotAreaPixels.html" title="SetPlotAreaPixels"><span class="refentrytitle">SetPlotAreaPixels</span></a> was already
48
called.
49
Starting with PHPlot-5.0.5, both functions just store the information,
50
and no calculations take place until <a class="xref" href="DrawGraph.html" title="DrawGraph"><span class="refentrytitle">DrawGraph</span></a> is used.
51
    </p><p>
52
Through PHPlot-5.0.4, SetPlotAreaWorld needed to access and interpret the data
53
array, so it had to be called after <a class="xref" href="SetDataValues.html" title="SetDataValues"><span class="refentrytitle">SetDataValues</span></a> sets the
54
data array, and after <a class="xref" href="SetDataType.html" title="SetDataType"><span class="refentrytitle">SetDataType</span></a> (if used).
55
Starting with PHPlot-5.0.5, this restriction no longer applies and the
56
functions can be called in any order.
57
    </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetPlotAreaPixels.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="SetPlotBgColor.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetPlotAreaPixels </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetPlotBgColor</td></tr></table></div></body></html>