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>GetLegendSize</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="GetDeviceXY.html" title="GetDeviceXY" /><link rel="next" href="PHPlot.html" title="PHPlot" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">GetLegendSize</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="GetDeviceXY.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="PHPlot.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="GetLegendSize"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">GetLegendSize</span></h2><p>GetLegendSize — Return the amount of space required for the legend box</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">list($width, $height) = $plot->GetLegendSize()</pre></div><div class="refsect1"><a id="idp1377733676"></a><h2>Description</h2><p>
|
|
|
3 |
<code class="function">GetLegendSize</code> returns the size (in pixels) required
|
|
|
4 |
for the legend box. This might be used to adjust the plot margins based on
|
|
|
5 |
the legend size, for example. After calling <code class="function">GetLegendSize</code>,
|
|
|
6 |
you can use <a class="xref" href="SetPlotAreaWorld.html" title="SetPlotAreaWorld"><span class="refentrytitle">SetPlotAreaWorld</span></a> or
|
|
|
7 |
<a class="xref" href="SetMarginsPixels.html" title="SetMarginsPixels"><span class="refentrytitle">SetMarginsPixels</span></a> to leave room for the legend.
|
|
|
8 |
</p></div><div class="refsect1"><a id="idp1377735916"></a><h2>Parameters</h2><p>
|
|
|
9 |
None
|
|
|
10 |
</p></div><div class="refsect1"><a id="idp1377736524"></a><h2>Return Value</h2><p>
|
|
|
11 |
Returns an array of two values ($width, $height). These are the width and
|
|
|
12 |
height required for the box containing the legend.
|
|
|
13 |
Returns FALSE if no legend has been defined.
|
|
|
14 |
</p></div><div class="refsect1"><a id="idp1377737284"></a><h2>Notes</h2><p>
|
|
|
15 |
This function will return valid numbers after the legend has been set up
|
|
|
16 |
(including using <a class="xref" href="SetLegend.html" title="SetLegend"><span class="refentrytitle">SetLegend</span></a> to set all the text lines,
|
|
|
17 |
and optional calls to set the font, linespacing, and style).
|
|
|
18 |
The results from this function do not depend on data values, plot type, or
|
|
|
19 |
other plot elements.
|
|
|
20 |
</p></div><div class="refsect1"><a id="idp1377738508"></a><h2>History</h2><p>
|
|
|
21 |
Starting with PHPlot-6.0.0, the function returns FALSE if no legend has
|
|
|
22 |
been defined yet. (In previous versions, the result was undefined if there
|
|
|
23 |
was no legend defined.)
|
|
|
24 |
</p><p>
|
|
|
25 |
This function was added in PHPlot-5.4.0.
|
|
|
26 |
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="GetDeviceXY.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="PHPlot.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">GetDeviceXY </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> PHPlot</td></tr></table></div></body></html>
|