Subversion Repositories cheapmusic

Rev

Blame | Last modification | View Log | RSS feed

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!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 &#8212; Position pie-chart labels</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot-&gt;SetLabelScalePosition(<em class="parameter"><code>$blp</code></em>)</pre></div><div class="refsect1"><a id="idp1378207604"></a><h2>Description</h2><p>
<code class="function">SetLabelScalePosition</code> adjusts the position of the pie
chart data labels which identify the pie segments.
    </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>
Position factor for the pie chart labels. This is a floating point number.
The default value is 0.5, which places the labels just outside the pie
circumference. See notes below.
          </p></dd></dl></div></div><div class="refsect1"><a id="idp1378210292"></a><h2>Notes</h2><p>
This affects pie charts only.
    </p><p>
Values greater than or equal to 0.5 place the labels outside the pie. The
default value 0.5 places the labels outside and close to the pie circumference.
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.
    </p><p>
Values less than 0.5 place the labels inside the pie circumference, with
smaller values moving the labels in towards the center. To place the labels
just inside the pie circumference, use 0.49 (for example). Using 0 (or
<code class="literal">False</code>) results in no labels at all.
    </p><p>
A more detailed definition of the label scale position parameter is that it
is a scale factor applied to the diameter of the pie (at the angle where the
label will be drawn), which determines the text basepoint for the label.
However, PHPlot adjusts the result when it is close to the pie circumference.
    </p><p>
Note that PHPlot sizes the pie chart so the labels fit inside the plot area,
if possible.
This means the label scale position will affect the pie size, if greater
than or equal to 0.5.
    </p><p>
To control the pie chart label contents, see <a class="xref" href="SetPieLabelType.html" title="SetPieLabelType"><span class="refentrytitle">SetPieLabelType</span></a>.
    </p></div><div class="refsect1"><a id="idp1378213764"></a><h2>History</h2><p>
Starting with PHPlot-5.6.0, the label scale position argument was interpreted
as above, with values greater than or equal to 0.5 meaning outside the pie,
values less than 0.5 meaning inside, and 0 meaning no labels.
Through PHPlot-5.5.0, the label scale position was used with less
precision, and included an additional 1.2 scale factor to try to move the
labels further out in the hope that they would be clear of the pie.
    </p><p>
Accepting 0 or <code class="literal">False</code> as a valid argument value to disable
the labels was added in PHPlot-5.6.0.
Before that, the labels were always plotted.
    </p><p>
The ability to control pie label contents, and the automatic sizing
of the pie to leave room for labels, were added in PHPlot-5.6.0. Through
PHPlot-5.5.0, pie chart labels always displayed segment percentages, and the
pie size was calculated without regard to the labels.
    </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>