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>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>
|
|
|
3 |
<code class="function">SetDataBorderColors</code> sets the colors used for data borders
|
|
|
4 |
on supported plot types.
|
|
|
5 |
For plot types <a class="link" href="conc-plottypes.html#plottype-bars" title="3.4.2. Plot Type: bars (Bar Plot)">bars</a> and
|
|
|
6 |
<a class="link" href="conc-plottypes.html#plottype-stackedbars" title="3.4.15. Plot Type: stackedbars (Stacked Bar Plot)">stackedbars</a>,
|
|
|
7 |
these are the borders around the individual bars or bar segments in the plot.
|
|
|
8 |
For plot types
|
|
|
9 |
<a class="link" href="conc-plottypes.html#plottype-area" title="3.4.1. Plot Type: area (Area Plot)">area</a>,
|
|
|
10 |
<a class="link" href="conc-plottypes.html#plottype-squaredarea" title="3.4.13. Plot Type: squaredarea (Squared Area Plot)">squaredarea</a>,
|
|
|
11 |
<a class="link" href="conc-plottypes.html#plottype-stackedarea" title="3.4.14. Plot Type: stackedarea (Stacked Area Plot)">stackedarea</a>, and
|
|
|
12 |
<a class="link" href="conc-plottypes.html#plottype-stackedsquaredarea" title="3.4.16. Plot Type: stackedsquaredarea (Stacked Squared Area Plot)">stackedsquaredarea</a>,
|
|
|
13 |
these are outlines of the filled areas.
|
|
|
14 |
</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>
|
|
|
15 |
An array of color values, one for the border of each data set.
|
|
|
16 |
Or, a single color value (not an array) to use for all data sets.
|
|
|
17 |
For other possibilities, see Notes.
|
|
|
18 |
See <a class="xref" href="conc-colors.html" title="3.5. Colors">Section 3.5, “Colors”</a> for more on color values.
|
|
|
19 |
</p></dd></dl></div></div><div class="refsect1"><a id="idp1377838396"></a><h2>Notes</h2><p>
|
|
|
20 |
If an array is used for <em class="parameter"><code>$border</code></em>, it
|
|
|
21 |
must use zero-based sequential integer indexes.
|
|
|
22 |
</p><p>
|
|
|
23 |
If this function is never called, a default color map is used which sets all
|
|
|
24 |
data borders to black.
|
|
|
25 |
</p><p>
|
|
|
26 |
Data borders can be used with plot types <code class="literal">bars</code> and
|
|
|
27 |
<code class="literal">stackedbars</code>.
|
|
|
28 |
With these plot types, by default,
|
|
|
29 |
unshaded plots (<a class="xref" href="SetShading.html" title="SetShading"><span class="refentrytitle">SetShading</span></a><code class="literal">(0)</code>)
|
|
|
30 |
have data borders, and shaded plots have a 3D-look and no data borders.
|
|
|
31 |
If you want unshaded plots with no data borders, use
|
|
|
32 |
<a class="xref" href="SetDrawDataBorders.html" title="SetDrawDataBorders"><span class="refentrytitle">SetDrawDataBorders</span></a><code class="literal">(FALSE)</code> to disable
|
|
|
33 |
the borders. You can enable data borders on shaded plots with
|
|
|
34 |
<a class="xref" href="SetDrawDataBorders.html" title="SetDrawDataBorders"><span class="refentrytitle">SetDrawDataBorders</span></a><code class="literal">(TRUE)</code>.
|
|
|
35 |
</p><p>
|
|
|
36 |
Data borders can also be used with plot types
|
|
|
37 |
<code class="literal">area</code>,
|
|
|
38 |
<code class="literal">squaredarea</code>,
|
|
|
39 |
<code class="literal">stackedarea</code>, and
|
|
|
40 |
<code class="literal">stackedsquaredarea</code>.
|
|
|
41 |
With these plot types, by default, data borders are not drawn.
|
|
|
42 |
You can enable data borders for these plot types with
|
|
|
43 |
<a class="xref" href="SetDrawDataBorders.html" title="SetDrawDataBorders"><span class="refentrytitle">SetDrawDataBorders</span></a><code class="literal">(TRUE)</code>.
|
|
|
44 |
</p><p>
|
|
|
45 |
The data border colors can also be used to outline the color boxes in a
|
|
|
46 |
legend. See <a class="xref" href="SetLegendColorboxBorders.html" title="SetLegendColorboxBorders"><span class="refentrytitle">SetLegendColorboxBorders</span></a> for this option.
|
|
|
47 |
</p><p>
|
|
|
48 |
If <em class="parameter"><code>$border</code></em> is not an array, but a single color
|
|
|
49 |
value, then that color will be used for all data sets.
|
|
|
50 |
However, the array(r,g,b) notation is not allowed in
|
|
|
51 |
this case (because it looks like an array of 3 separate color values).
|
|
|
52 |
You can get around this restriction if you want to specify a single color
|
|
|
53 |
as an R, G, B array by wrapping the array in another array, for example:
|
|
|
54 |
<code class="literal">array(array(102, 0, 192))</code>.
|
|
|
55 |
</p><p>
|
|
|
56 |
Two special uses of the <em class="parameter"><code>$border</code></em> argument
|
|
|
57 |
are available.
|
|
|
58 |
If the argument is an empty string, or boolean False, the color map is reset
|
|
|
59 |
to the defaults. This can be used to restore the default color map.
|
|
|
60 |
If the argument is NULL or missing from the function call, the color map is
|
|
|
61 |
reset to the defaults, but only if it has not already been set.
|
|
|
62 |
This is used internal to PHPlot for one-time initialization.
|
|
|
63 |
</p><p>
|
|
|
64 |
A data colors callback, as described in
|
|
|
65 |
<a class="xref" href="adv-datacolor-callback.html" title="4.5. Custom Data Color Selection">Section 4.5, “Custom Data Color Selection”</a>,
|
|
|
66 |
also controls selection of the color for data borders (if used).
|
|
|
67 |
Note this does not apply to plot types that do not use the data colors
|
|
|
68 |
callback.
|
|
|
69 |
</p></div><div class="refsect1"><a id="idp1377848884"></a><h2>History</h2><p>
|
|
|
70 |
Starting with PHPlot-6.2.0, data borders are available with
|
|
|
71 |
<code class="literal">area</code> and <code class="literal">stackedarea</code> plot types,
|
|
|
72 |
and with the new
|
|
|
73 |
<code class="literal">squaredarea</code> and <code class="literal">stackedsquaredarea</code>
|
|
|
74 |
plot types.
|
|
|
75 |
</p><p>
|
|
|
76 |
Before PHPlot-6.0.0, unshaded bar and stackedbar plots always had data borders,
|
|
|
77 |
and shaded bar and stackedbar plots never had data borders.
|
|
|
78 |
</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>
|