Blending, Clustering, and Stacking (XGRAPH command)
Blending on an axis is indicated by +
. This is used when separate variables
are displayed on the same axis.
Clustering and stacking are indicated by >
. On the x- or z-axis, this indicates
clustering. On the y-axis, this
indicates stacking. Stacking is allowed with one clustering variable;
or two clustering variables are allowed, one on the x-axis and one on the z-axis.
+. Scales the axis to accommodate all of the variables on that dimension.
>. Stacks groups on the y-axis, and clusters groups on the x- and z-axes.
Stacking Example
XGRAPH CHART=(salary [MEAN] [BAR]) > educ BY jobcat[c] by gender[c].
Clustering Example
XGRAPH CHART=(salary [MEAN] [BAR]) BY jobcat[c] > educ by gender[c].
When you use clustering or stacking, you can specify how the clusters and stacks are differentiated in the chart.
[COLOR]. Uses color to differentiate the clusters or stacks.
[PATTERN]. Uses pattern to differentiate the clusters or stacks.
[COLOR]
and [PATTERN]
follow these rules:
- The actual colors and patterns are specified in the Options. You can access these by choosing Options from the Edit menu. Then click the Charts tab.
-
[COLOR]
and[PATTERN]
follow the stacking or clustering variable in the chart expression. - If the specification is omitted, color is used to differentiate the clusters or stacks. The color cycle starts over for each dimension.
- If neither
[COLOR]
nor[PATTERN]
is specified,XGRAPH
uses the Style Cycle Preference specified by the Options. - If
[COLOR]
or[PATTERN]
is specified for both dimensions, these specifications are honored. The color or pattern cycle starts over for each dimension. - If
[COLOR]
or[PATTERN]
is specified for only one dimension, the specification is honored, and the other dimension uses the other specification.
Example
XGRAPH CHART=(salary [MEAN] [BAR]) BY jobcat[c] > educ[PATTERN]
by gender[c].