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>SetErrorBarColors</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="SetDrawYGrid.html" title="SetDrawYGrid" /><link rel="next" href="SetErrorBarLineWidth.html" title="SetErrorBarLineWidth" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetErrorBarColors</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetDrawYGrid.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n" href="SetErrorBarLineWidth.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetErrorBarColors"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetErrorBarColors</span></h2><p>SetErrorBarColors — Sets the colors used for data error bars</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot->SetErrorBarColors(<em class="parameter"><code>$error_bar_colors</code></em>)</pre></div><div class="refsect1"><a id="idp1378049900"></a><h2>Description</h2><p>
|
|
|
3 |
<code class="function">SetErrorBarColors</code> sets the colors used for each
|
|
|
4 |
data set's error bars, in the same way <a class="xref" href="SetDataColors.html" title="SetDataColors"><span class="refentrytitle">SetDataColors</span></a>
|
|
|
5 |
sets the colors used for the data plot itself.
|
|
|
6 |
</p></div><div class="refsect1"><a id="idp1378051348"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$error_bar_colors</code></em></span></dt><dd><p>
|
|
|
7 |
An array of color values, one for each data set's error bars.
|
|
|
8 |
Or, a single color value (not an array) to use for all data set error bars.
|
|
|
9 |
For other possibilities, see Notes.
|
|
|
10 |
See <a class="xref" href="conc-colors.html" title="3.5. Colors">Section 3.5, “Colors”</a> for more on color values.
|
|
|
11 |
</p></dd></dl></div></div><div class="refsect1"><a id="idp1378053340"></a><h2>Notes</h2><p>
|
|
|
12 |
If an array is used for <em class="parameter"><code>$error_bar_colors</code></em>, it
|
|
|
13 |
must use zero-based sequential integer indexes.
|
|
|
14 |
</p><p>
|
|
|
15 |
If <em class="parameter"><code>$error_bar_colors</code></em> is not an array, but a single color
|
|
|
16 |
value, then that color will be used for all data sets' error bars.
|
|
|
17 |
However, the array(r,g,b) notation is not allowed in
|
|
|
18 |
this case (because it looks like an array of 3 separate color values).
|
|
|
19 |
You can get around this restriction if you want to specify a single color
|
|
|
20 |
as an R, G, B array by wrapping the array in another array, for example:
|
|
|
21 |
<code class="literal">array(array(102, 0, 192))</code>.
|
|
|
22 |
</p><p>
|
|
|
23 |
Two special uses of the <em class="parameter"><code>$error_bar_colors</code></em> argument
|
|
|
24 |
are available.
|
|
|
25 |
If the argument is an empty string, or boolean False, the color map is reset
|
|
|
26 |
to the defaults. This can be used to restore the default color map.
|
|
|
27 |
If the argument is NULL or missing from the function call, the color map is
|
|
|
28 |
reset to the defaults, but only if it has not already been set.
|
|
|
29 |
This is used internal to PHPlot for one-time initialization.
|
|
|
30 |
</p><p>
|
|
|
31 |
If SetErrorBarColors is never called, the default color map is the same as
|
|
|
32 |
for <a class="xref" href="SetDataColors.html" title="SetDataColors"><span class="refentrytitle">SetDataColors</span></a>. It contains 16 colors, starting with
|
|
|
33 |
SkyBlue, green, orange, and blue.
|
|
|
34 |
For the full list, see <a class="xref" href="conc-colors.html#conc-colors-datacolors" title="3.5.3. Plotting Colors">Section 3.5.3, “Plotting Colors”</a>.
|
|
|
35 |
</p><p>
|
|
|
36 |
If you change the data colors with <a class="xref" href="SetDataColors.html" title="SetDataColors"><span class="refentrytitle">SetDataColors</span></a>,
|
|
|
37 |
you probably want to change the error bar colors to the same array.
|
|
|
38 |
</p><p>
|
|
|
39 |
A data colors callback, as described in
|
|
|
40 |
<a class="xref" href="adv-datacolor-callback.html" title="4.5. Custom Data Color Selection">Section 4.5, “Custom Data Color Selection”</a>,
|
|
|
41 |
also controls selection of the color for error bars.
|
|
|
42 |
</p></div><div class="refsect1"><a id="idp1378059076"></a><h2>History</h2><p>
|
|
|
43 |
Through PHPlot-5.0.7, the default color map contained these 8 colors:
|
|
|
44 |
SkyBlue, green, orange, blue, orange, red, violet, and azure1.
|
|
|
45 |
These were used if SetErrorBarColors was never called.
|
|
|
46 |
Also, through PHPlot-5.0.7, if SetErrorBarColors was called with an empty
|
|
|
47 |
string argument, the color map was set to just contain 'black'.
|
|
|
48 |
Starting with PHPlot-5.1.0, a new default color map with 16 colors was
|
|
|
49 |
defined. Given an empty string (or False), SetErrorBarColors now restores the
|
|
|
50 |
default color map.
|
|
|
51 |
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetDrawYGrid.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="SetErrorBarLineWidth.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetDrawYGrid </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetErrorBarLineWidth</td></tr></table></div></body></html>
|