color Function (For GPL Graphic Elements)
Note: If you are modifying the color for a guide, refer to color Function (For GPL Guides) .
Syntax
color(<algebra>)
or
color(color.<color constant>)
or
color(color."color value")
or
color(<statistic function>)
<algebra>. Graph algebra, using one variable or a blend of variables. Each unique variable value results in a different color. For example, if you were creating a stacked bar chart, the argument of the color function would be the variable that controls the stacking. Each stack segment would be a different color.
<color constant>.
A constant indicating a specific color, such as red
. See the topic Color Constants (GPL) for more information. Color constants can also be blended
(for example, color.blue+color.red
).
"color value".
A specific value that indicates the hexadecimal RGB color components (for
example, color."6666FF"
).
<statistic function>. A statistic function.
Description
Controls the color of the graphic elements. To specify the color
explicitly for the fill or border of the graphic element, you can
append .interior
or .exterior
to
the function. Using color
without a qualifier implies color.interior
.
Examples
ELEMENT: line(position(x*y), color(color.red))
ELEMENT: line(position(x*y), color(color."FF0000"))
ELEMENT: interval(position(x*y), color.exterior(color.red))
ELEMENT: point(position(x*y), color(z))
ELEMENT: interval(position(summary.mean(jobcat*salary)),
color(summary.count()))
Statistic Functions
See GPL Functions .