ELEMENT Statement (GPL)

Syntax

ELEMENT: <element type>

<element type>. A valid element type.

Description

Specifies a graphic element used to draw data on the graph. Graphic elements are the bars, points, lines, etc., that make up a graph.

There can be multiple ELEMENT statements in the same block of GPL to create multiple graphic elements. In this case, the variables in multiple ELEMENT statements share the same dimension and aesthetic scales.

For example, assume the GPL includes the following ELEMENT statements:

ELEMENT: point(position(x*y))
ELEMENT: point(position(x2*y2))

In the resulting graph, dimension 1 uses x+x2, and dimension 2 uses y+y2.

Note: This behavior is sometimes called an implied blend because we could have written the GPL as follows:

ELEMENT: point(position(x*y+x2*y2))

Examples

Figure 1. Example: Scatterplot
ELEMENT: point(position(x*y))
Figure 2. Example: Line chart
ELEMENT: line(position(x*y))
Figure 3. Example: Bar chart of means
ELEMENT: interval(position(summary.mean(x*y)))