Variable Specification (SPCHART command)
VAR BY VAR
The variable that is specified before
BY
is the process variable, which is the
variable that contains values for all instances to be plotted (for
example, LENGTH in Table 1). The
variable that is specified after BY
is the category variable or the BY
variable, which is the subgroup identifier (for example, SUBGROUP in Table 1). The process variable must
be numeric, while the category variable can be of any type. The chart
is sorted by the category variable. VAR VAR [VAR...] [BY VAR]
Each of the variables that is specified before
BY
represents an instance to be plotted
(for example, N1 to N3 in Table 2). At least two variables are required, and
each variable must be numeric. Keyword BY
and the category variable (for example, SUBGROUP in Table 2) are optional; if specified, the category variable provides
labels for the category axis and
can be any type of variable. If omitted, the category axis is labeled from 1 to the number of variables
that are specified before keyword BY
. Example
SPCHART /TEMPLATE='ctrl.sgt'
/XR SUBSIZE BY SHIFT.
- The data are organized as shown in Table 1. SUBSIZE is a numeric variable that measures the part size. SHIFT contains the subgroup identifier (work shift number).
- The chart template is stored in the chart file ctrl.sgt.