SCALE Statement (GPL)

Syntax

SCALE: <scale type>

or

SCALE: <scale name> = <scale type>

<scale type>. A valid scale type.

<scale name>. A user-defined name for the scale. This is required only when you are creating a graph with dual scales. An example is a graph that shows the mean of a variable on one axis and the count on the other. The scale name is referenced by an axis and a graphic element to indicate which scale is associated with the axis and graphic element. Refer to GPL Syntax Rules for information about which characters you can use in the name.

Description

Defines the scale for a particular dimension or aesthetic (such as color).

Examples

Figure 1. Example: Specifying a linear dimension scale
SCALE: linear(dim(2), max(50000))
Figure 2. Example: Specifying a log aesthetic scale
SCALE: log(aesthetic(aesthetic.color))
ELEMENT: point(position(x*y), color(z))
Figure 3. Example: Creating a graph with dual scales
SCALE: y1 = linear(dim(2))
SCALE: y2 = linear(dim(2))
GUIDE: axis(dim(1), label("Employment Category"))
GUIDE: axis(scale(y1), label("Mean Salary"))
GUIDE: axis(scale(y2), label("Count"), opposite(), color(color.red))
ELEMENT: interval(scale(y1), position(summary.mean(jobcat*salary)))
ELEMENT: line(scale(y2), position(summary.count(jobcat)), color(color.red))