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>SetPrecisionY</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="SetPrecisionX.html" title="SetPrecisionX" /><link rel="next" href="SetPrintImage.html" title="SetPrintImage" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetPrecisionY</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetPrecisionX.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="SetPrintImage.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetPrecisionY"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetPrecisionY</span></h2><p>SetPrecisionY &#8212; Set precision for numeric formated Y labels</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot-&gt;SetPrecisionY(<em class="parameter"><code>$prec</code></em>)</pre></div><div class="refsect1"><a id="idp1378706732"></a><h2>Description</h2><p>
<code class="function">SetPrecisionY</code> sets the desired numeric precision
for Y tick and data labels, and also enables 'data' mode formatting
of those labels with <a class="xref" href="SetYLabelType.html" title="SetYLabelType"><span class="refentrytitle">SetYLabelType</span></a>.
    </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
This function is retained for compatibility, but use of
<a class="xref" href="SetYLabelType.html" title="SetYLabelType"><span class="refentrytitle">SetYLabelType</span></a> is preferred.
      </p></div></div><div class="refsect1"><a id="idp1378709004"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$prec</code></em></span></dt><dd><p>
The desired numeric precision.
This is the number of decimal positions to output.
          </p></dd></dl></div></div><div class="refsect1"><a id="idp1378710548"></a><h2>Notes</h2><p>
Setting numeric precision with this function automatically enables 'data'
mode formatting as if <code class="literal">SetYLabelType('data')</code> was called.
    </p><p>
The default is to format numbers with 1 decimal position, but only
if 'data' mode formatting is selected.
    </p><p>
This function applies to both Y tick labels and Y data labels.
(Y data labels are data value labels within the plot area for vertical plots,
or axis data labels for horizontal plots.
See <a class="xref" href="conc-labels.html" title="3.6. Labels">Section 3.6, &#8220;Labels&#8221;</a> for more on labels.)
Using 'data' format for Y axis data labels only makes sense
when your data array contains numeric data in the label position.
    </p><p>
See <a class="xref" href="SetPrecisionX.html" title="SetPrecisionX"><span class="refentrytitle">SetPrecisionX</span></a> for X tick and data labels.
    </p><p>
This function also affects pie chart labels, for backward compatibility.
When drawing a pie chart, if <a class="xref" href="SetPieLabelType.html" title="SetPieLabelType"><span class="refentrytitle">SetPieLabelType</span></a> was not called,
and <code class="function">SetPrecisionY</code> was called, then the precision set
with <code class="function">SetPrecisionY</code> is used when formatting pie chart
labels.
    </p></div><div class="refsect1"><a id="idp1378714852"></a><h2>History</h2><p>
Starting with PHPlot-5.0.6, using <code class="code">SetPrecisionY($n)</code>
is exactly the same as calling <code class="code">SetYLabelType('data', $n)</code>.
    </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetPrecisionX.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="SetPrintImage.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetPrecisionX </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetPrintImage</td></tr></table></div></body></html>