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>SetLabelScalePosition</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="SetIsInline.html" title="SetIsInline" /><link rel="next" href="SetLegend.html" title="SetLegend" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetLabelScalePosition</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetIsInline.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="SetLegend.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetLabelScalePosition"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetLabelScalePosition</span></h2><p>SetLabelScalePosition — Position pie-chart labels</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot->SetLabelScalePosition(<em class="parameter"><code>$blp</code></em>)</pre></div><div class="refsect1"><a id="idp1378207604"></a><h2>Description</h2><p>
|
|
|
3 |
<code class="function">SetLabelScalePosition</code> adjusts the position of the pie
|
|
|
4 |
chart data labels which identify the pie segments.
|
|
|
5 |
</p></div><div class="refsect1"><a id="idp1378208652"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$blp</code></em></span></dt><dd><p>
|
|
|
6 |
Position factor for the pie chart labels. This is a floating point number.
|
|
|
7 |
The default value is 0.5, which places the labels just outside the pie
|
|
|
8 |
circumference. See notes below.
|
|
|
9 |
</p></dd></dl></div></div><div class="refsect1"><a id="idp1378210292"></a><h2>Notes</h2><p>
|
|
|
10 |
This affects pie charts only.
|
|
|
11 |
</p><p>
|
|
|
12 |
Values greater than or equal to 0.5 place the labels outside the pie. The
|
|
|
13 |
default value 0.5 places the labels outside and close to the pie circumference.
|
|
|
14 |
Larger values move the labels away from the pie. A value of 1.0 would place the labels about twice as far from the pie center as the pie radius.
|
|
|
15 |
</p><p>
|
|
|
16 |
Values less than 0.5 place the labels inside the pie circumference, with
|
|
|
17 |
smaller values moving the labels in towards the center. To place the labels
|
|
|
18 |
just inside the pie circumference, use 0.49 (for example). Using 0 (or
|
|
|
19 |
<code class="literal">False</code>) results in no labels at all.
|
|
|
20 |
</p><p>
|
|
|
21 |
A more detailed definition of the label scale position parameter is that it
|
|
|
22 |
is a scale factor applied to the diameter of the pie (at the angle where the
|
|
|
23 |
label will be drawn), which determines the text basepoint for the label.
|
|
|
24 |
However, PHPlot adjusts the result when it is close to the pie circumference.
|
|
|
25 |
</p><p>
|
|
|
26 |
Note that PHPlot sizes the pie chart so the labels fit inside the plot area,
|
|
|
27 |
if possible.
|
|
|
28 |
This means the label scale position will affect the pie size, if greater
|
|
|
29 |
than or equal to 0.5.
|
|
|
30 |
</p><p>
|
|
|
31 |
To control the pie chart label contents, see <a class="xref" href="SetPieLabelType.html" title="SetPieLabelType"><span class="refentrytitle">SetPieLabelType</span></a>.
|
|
|
32 |
</p></div><div class="refsect1"><a id="idp1378213764"></a><h2>History</h2><p>
|
|
|
33 |
Starting with PHPlot-5.6.0, the label scale position argument was interpreted
|
|
|
34 |
as above, with values greater than or equal to 0.5 meaning outside the pie,
|
|
|
35 |
values less than 0.5 meaning inside, and 0 meaning no labels.
|
|
|
36 |
Through PHPlot-5.5.0, the label scale position was used with less
|
|
|
37 |
precision, and included an additional 1.2 scale factor to try to move the
|
|
|
38 |
labels further out in the hope that they would be clear of the pie.
|
|
|
39 |
</p><p>
|
|
|
40 |
Accepting 0 or <code class="literal">False</code> as a valid argument value to disable
|
|
|
41 |
the labels was added in PHPlot-5.6.0.
|
|
|
42 |
Before that, the labels were always plotted.
|
|
|
43 |
</p><p>
|
|
|
44 |
The ability to control pie label contents, and the automatic sizing
|
|
|
45 |
of the pie to leave room for labels, were added in PHPlot-5.6.0. Through
|
|
|
46 |
PHPlot-5.5.0, pie chart labels always displayed segment percentages, and the
|
|
|
47 |
pie size was calculated without regard to the labels.
|
|
|
48 |
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetIsInline.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="SetLegend.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetIsInline </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetLegend</td></tr></table></div></body></html>
|