You can specify a label for the vertical axis of a primary chart by using a LABEL statement to assign the label to a particular variable in the input data set. The type of input data set, the chart statement, and the process specified in the chart statement determine which variable to use in the LABEL statement.
|BOXCHART with CONTROLSTAT=MEAN||X|
|BOXCHART with CONTROLSTAT=MEDIAN||M|
If the prefix process consists of 8 characters, shorten the prefix to its first 4 characters and last 3 characters before adding the suffix.
|BOXCHART with CONTROLSTAT=MEAN||_SUBX_|
|BOXCHART with CONTROLSTAT=MEDIAN||_SUBMED_|
If the chart statement produces primary and secondary charts, as in the case of the XSCHART statement, you can break the label into two parts by including a split character in the label. The part before the split character labels the vertical axis of the primary chart, and the part after the split character labels the vertical axis of the secondary chart. To specify the split character, use the SPLIT= option in the chart statement.
For example, the following statements redisplay the and s charts in Figure 47.30 with specified labels for the horizontal and vertical axes:
title 'Control Chart for Diameter'; proc shewhart history=parts; xschart diam*sample / split = '/' cframe = vibg cconnect= salmon cinfill = ywh; label sample = 'Sample Number' diamx = 'Average Diameter/Std Deviation'; run;The charts are displayed in Figure 47.31. Because the input data set PARTS is a HISTORY= data set, the vertical axes are labeled by assigning a label to the subgroup mean variable DIAMX (that is, the process DIAM with the suffix X).* Assigning a label to DIAM would result in an error message since DIAM is interpreted as a prefix rather than a SAS variable.
If the input data set were a DATA= data set rather than a HISTORY= data set, you would associate the label with the variable DIAM. If the input data set were a TABLE= data set, you would associate the label with the variable _SUBX_.
For another illustration, see Example 36.2.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.