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>SetLegendWorld</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="SetLegendUseShapes.html" title="SetLegendUseShapes" /><link rel="next" href="SetLightGridColor.html" title="SetLightGridColor" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetLegendWorld</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetLegendUseShapes.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="SetLightGridColor.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetLegendWorld"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetLegendWorld</span></h2><p>SetLegendWorld — Position the legend on the image (world coordinates)</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot->SetLegendWorld(<em class="parameter"><code>$x</code></em>, <em class="parameter"><code>$y</code></em>)</pre></div><div class="refsect1"><a id="idp1378339612"></a><h2>Description</h2><p>
|
|
|
3 |
<code class="function">SetLegendWorld</code> lets you position the legend on the
|
|
|
4 |
image, using world coordinates, rather than letting PHPlot position it for you.
|
|
|
5 |
(World coordinates are the coordinate space of your data points.)
|
|
|
6 |
</p></div><div class="refsect1"><a id="idp1378340748"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$x</code></em>, </span><span class="term"><em class="replaceable"><code>$y</code></em></span></dt><dd><p>
|
|
|
7 |
World coordinates of the upper left corner of the legend box.
|
|
|
8 |
The units and origin are the same as the data you are plotting.
|
|
|
9 |
</p></dd></dl></div></div><div class="refsect1"><a id="idp1378342572"></a><h2>Notes</h2><p>
|
|
|
10 |
The default behavior is for PHPlot to position the legend in the
|
|
|
11 |
upper right corner of the plot area.
|
|
|
12 |
</p><p>
|
|
|
13 |
See <a class="xref" href="SetLegendPosition.html" title="SetLegendPosition"><span class="refentrytitle">SetLegendPosition</span></a> for more flexible legend
|
|
|
14 |
positioning options.
|
|
|
15 |
<code class="literal">SetLegendWorld($x, $y)</code> is equivalent to
|
|
|
16 |
<code class="literal">SetLegendPosition(0, 0, 'world', $x, $y)</code>.
|
|
|
17 |
This places the top left corner of the legend at world coordinates $x, $y
|
|
|
18 |
with no pixel offset.
|
|
|
19 |
</p><p>
|
|
|
20 |
See also <a class="xref" href="SetLegendPixels.html" title="SetLegendPixels"><span class="refentrytitle">SetLegendPixels</span></a>.
|
|
|
21 |
</p><p>
|
|
|
22 |
This function will not work with pie charts, because they have no valid
|
|
|
23 |
world coordinates.
|
|
|
24 |
</p></div><div class="refsect1"><a id="idp1378345628"></a><h2>History</h2><p>
|
|
|
25 |
This function did actually work with pie charts through PHPlot-5.5.0,
|
|
|
26 |
although we are not sure what it did, since pie charts do not have valid
|
|
|
27 |
world coordinates.
|
|
|
28 |
</p><p>
|
|
|
29 |
Through PHPlot-5.0rc3, it was required that the
|
|
|
30 |
data array, axis types, and any other setting which affects the scale of
|
|
|
31 |
the data be set up before this function is used.
|
|
|
32 |
Starting at PHPlot-5.0.4 this is no longer required, as the coordinates
|
|
|
33 |
you supply are not scaled until the plot is drawn.
|
|
|
34 |
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetLegendUseShapes.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="SetLightGridColor.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetLegendUseShapes </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetLightGridColor</td></tr></table></div></body></html>
|