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>SetDataBorderColors</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="SetCallback.html" title="SetCallback" /><link rel="next" href="SetDataColors.html" title="SetDataColors" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">SetDataBorderColors</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="SetCallback.html">Prev</a> </td><th width="60%" align="center">PHPlot Function Reference</th><td width="20%" align="right"> <a accesskey="n"
href="SetDataColors.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="SetDataBorderColors"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">SetDataBorderColors</span></h2><p>SetDataBorderColors — Set the data border colors</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">$plot->SetDataBorderColors(<em class="parameter"><code>$border</code></em>)</pre></div><div class="refsect1"><a id="idp1377832572"></a><h2>Description</h2><p>
<code class="function">SetDataBorderColors</code> sets the colors used for data borders
on supported plot types.
For plot types <a class="link" href="conc-plottypes.html#plottype-bars" title="3.4.2. Plot Type: bars (Bar Plot)">bars</a> and
<a class="link" href="conc-plottypes.html#plottype-stackedbars" title="3.4.15. Plot Type: stackedbars (Stacked Bar Plot)">stackedbars</a>,
these are the borders around the individual bars or bar segments in the plot.
For plot types
<a class="link" href="conc-plottypes.html#plottype-area" title="3.4.1. Plot Type: area (Area Plot)">area</a>,
<a class="link" href="conc-plottypes.html#plottype-squaredarea" title="3.4.13. Plot Type: squaredarea (Squared Area Plot)">squaredarea</a>,
<a class="link" href="conc-plottypes.html#plottype-stackedarea" title="3.4.14. Plot Type: stackedarea (Stacked Area Plot)">stackedarea</a>, and
<a class="link" href="conc-plottypes.html#plottype-stackedsquaredarea" title="3.4.16. Plot Type: stackedsquaredarea (Stacked Squared Area Plot)">stackedsquaredarea</a>,
these are outlines of the filled areas.
</p></div><div class="refsect1"><a id="idp1377836396"></a><h2>Parameters</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="replaceable"><code>$border</code></em></span></dt><dd><p>
An array of color values, one for the border of each data set.
Or, a single color value (not an array) to use for all data sets.
For other possibilities, see Notes.
See <a class="xref" href="conc-colors.html" title="3.5. Colors">Section 3.5, “Colors”</a> for more on color values.
</p></dd></dl></div></div><div class="refsect1"><a id="idp1377838396"></a><h2>Notes</h2><p>
If an array is used for <em class="parameter"><code>$border</code></em>, it
must use zero-based sequential integer indexes.
</p><p>
If this function is never called, a default color map is used which sets all
data borders to black.
</p><p>
Data borders can be used with plot types <code class="literal">bars</code> and
<code class="literal">stackedbars</code>.
With these plot types, by default,
unshaded plots (<a class="xref" href="SetShading.html" title="SetShading"><span class="refentrytitle">SetShading</span></a><code class="literal">(0)</code>)
have data borders, and shaded plots have a 3D-look and no data borders.
If you want unshaded plots with no data borders, use
<a class="xref" href="SetDrawDataBorders.html" title="SetDrawDataBorders"><span class="refentrytitle">SetDrawDataBorders</span></a><code class="literal">(FALSE)</code> to disable
the borders. You can enable data borders on shaded plots with
<a class="xref" href="SetDrawDataBorders.html" title="SetDrawDataBorders"><span class="refentrytitle">SetDrawDataBorders</span></a><code class="literal">(TRUE)</code>.
</p><p>
Data borders can also be used with plot types
<code class="literal">area</code>,
<code class="literal">squaredarea</code>,
<code class="literal">stackedarea</code>, and
<code class="literal">stackedsquaredarea</code>.
With these plot types, by default, data borders are not drawn.
You can enable data borders for these plot types with
<a class="xref" href="SetDrawDataBorders.html" title="SetDrawDataBorders"><span class="refentrytitle">SetDrawDataBorders</span></a><code class="literal">(TRUE)</code>.
</p><p>
The data border colors can also be used to outline the color boxes in a
legend. See <a class="xref" href="SetLegendColorboxBorders.html" title="SetLegendColorboxBorders"><span class="refentrytitle">SetLegendColorboxBorders</span></a> for this option.
</p><p>
If <em class="parameter"><code>$border</code></em> is not an array, but a single color
value, then that color will be used for all data sets.
However, the array(r,g,b) notation is not allowed in
this case (because it looks like an array of 3 separate color values).
You can get around this restriction if you want to specify a single color
as an R, G, B array by wrapping the array in another array, for example:
<code class="literal">array(array(102, 0, 192))</code>.
</p><p>
Two special uses of the <em class="parameter"><code>$border</code></em> argument
are available.
If the argument is an empty string, or boolean False, the color map is reset
to the defaults. This can be used to restore the default color map.
If the argument is NULL or missing from the function call, the color map is
reset to the defaults, but only if it has not already been set.
This is used internal to PHPlot for one-time initialization.
</p><p>
A data colors callback, as described in
<a class="xref" href="adv-datacolor-callback.html" title="4.5. Custom Data Color Selection">Section 4.5, “Custom Data Color Selection”</a>,
also controls selection of the color for data borders (if used).
Note this does not apply to plot types that do not use the data colors
callback.
</p></div><div class="refsect1"><a id="idp1377848884"></a><h2>History</h2><p>
Starting with PHPlot-6.2.0, data borders are available with
<code class="literal">area</code> and <code class="literal">stackedarea</code> plot types,
and with the new
<code class="literal">squaredarea</code> and <code class="literal">stackedsquaredarea</code>
plot types.
</p><p>
Before PHPlot-6.0.0, unshaded bar and stackedbar plots always had data borders,
and shaded bar and stackedbar plots never had data borders.
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="SetCallback.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="SetDataColors.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">SetCallback </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> SetDataColors</td></tr></table></div></body></html>