label Function (For GPL Graphic Elements)

Note: If you are modifying the label for a guide (like an axis), refer to label Function (For GPL Guides) .

Syntax

label("label text", <function>)

or

label(<algebra>, <function>)

or

label(<statistic function>, <function>)

"label text". The text that appears in the label. Multiple strings are concatenated when each string is separated by a comma (for example, label("This is a ", "long label")).

<function>. One or more valid functions. These are optional.

<algebra>. Graph algebra, using one variable or a blend of variables.

<statistic function>. A valid statistic function.

Description

Specifies a label for a graphic element. The label appears on the graphic element. Multiple label functions can be specified. The result of each label function is displayed on a separate line in the graph.

Examples

Figure 1. Example: Labeling by another variable
ELEMENT: point(position(salbegin*salary), label(gender))
Figure 2. Example: Labeling by the result of a statistic
ELEMENT: point(position(summary.count(jobcat)), label(summary.count()))
Figure 3. Example: Labeling by the result of a statistic
ELEMENT: interval(position(summary.mean(jobcat*salary)), label(summary.mean(salary)))
Figure 4. Example: Creating a multi-line label
ELEMENT: interval(position(summary.mean(jobcat*salary)), label("Count:"), label(summary.count()))

Statistic Functions

See GPL Functions .