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>SetPieAutoSize</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="SetOutputFile.html" title="SetOutputFile" /><link rel="next" href="SetPieBorderColor.html" title="SetPieBorderColor" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetPieAutoSize</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetOutputFile.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="SetPieBorderColor.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetPieAutoSize"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetPieAutoSize</span></h2><p>SetPieAutoSize &#8212; Enable or disable automatic pie chart size calculation</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot-&gt;SetPieAutoSize(<em class="parameter"><code>$enable</code></em>)</pre></div><div class="refsect1"><a id="idp1378446612"></a><h2>Description</h2><p>
<code class="function">SetPieAutoSize</code> controls the automatic pie chart size
calculation. When this is enabled, PHPlot calculates the size of the pie
by taking the label sizes into account.
    </p></div><div class="refsect1"><a id="idp1378447724"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$enable</code></em></span></dt><dd><p>
<code class="literal">True</code> to enable automatic size calculation,
or <code class="literal">False</code> to use the maximum area.
          </p></dd></dl></div></div><div class="refsect1"><a id="idp1378449948"></a><h2>Notes</h2><p>
By default, automatic pie chart sizing is enabled.
    </p><p>
If automatic pie chart sizing is disabled, PHPlot will make the pie as
large as possible to fit within the plot area (see
<a class="xref" href="SetPlotAreaPixels.html" title="SetPlotAreaPixels"><span class="refentrytitle">SetPlotAreaPixels</span></a>), minus a small 5-pixel margin on each
side. The center of the pie is always at the center of the plot area.
    </p><p>
If automatic pie chart sizing is enabled, PHPlot will leave additional room
within the plot area for the pie chart labels. It will calculate the maximum
width and height of the labels, and use these to increase the margins. Note
that it does not take into account where each label is displayed. For
example, if there is a very wide label displayed only at the top of the pie,
this will still result in a decrease in overall pie width.
    </p><p>
If pie labels are either disabled or positioned inside the pie
(using <a class="xref" href="SetLabelScalePosition.html" title="SetLabelScalePosition"><span class="refentrytitle">SetLabelScalePosition</span></a>),
then <code class="function">SetPieAutoSize()</code> has no effect.
Whether automatic sizing is on or off, the pie chart will use the maximum
size in this case, since no additional space is needed for labels.
    </p><p>
With automatic pie chart sizing enabled, PHPlot prevents overly long labels
from resulting in a pie chart which is too small.  It does this by limiting
the minimum pie size to one half of the plot width or height, even if this
causes labels to run off the edge.
This behavior can be adjusted - see <a class="xref" href="adv-tuning.html#adv-tuning-pie" title="4.7.5. Tuning Pie Charts">Section 4.7.5, &#8220;Tuning Pie Charts&#8221;</a> for more.
    </p></div><div class="refsect1"><a id="idp1378454068"></a><h2>History</h2><p>
This function was added in PHPlot-5.6.0. In earlier releases, PHPlot never
took label sizes into account when calculating the pie size. Note that the
default <code class="literal">True</code> is not backward compatible.
However, there were additional changes made to pie chart sizing and label
positioning in PHPlot-5.6.0, such that neither enabling nor disabling
automatic sizing will produce identical results compared to previous releases.
    </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetOutputFile.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="SetPieBorderColor.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetOutputFile </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetPieBorderColor</td></tr></table></div></body></html>