XSCHART Procedure
Creates an XS chart with an X Bar chart on top and an S chart beneath it. Generally, you input data from an in-control process to determine the upper and lower control limits. You then enter subsequent data using the control limits from the in-control process to determine if the process remains in control.
Usage
XSCHART, data
Input Parameters
data—A one or two dimensional array of process data. A 1D-array contains summarized data. For example, sample means for each sample, and requires the 'PSigma' and 'Sampn' keywords (below).
A 2D-array must be of the form MxN, where M is the number of samples and N is the number of observations in each sample. Each sample must contain the same number of observations. For example, if you take four measurements from each of 16 production runs you must arrange the data into a 16x4 array.
Keywords
AnnotColor—Color index for the chart annotation. (Defaults to !P.COLOR)
Background—A color index for the plot background.
(XS)CLineColor—Color index for the central(mean) line. (Defaults to !P.COLOR)
(XS)CLineStyle—A linestyle value for the central line. (Defaults to solid)
(XS)ClineThick—A thickness value for the central line. (Defaults to 1.0)
(XS)Color—A color index for the plot axes. (Defaults to !P.COLOR)
DTarray—Array of Date/Time variables to be used for the X axes. This causes the graphs to be slightly compressed to accommodate the DT axes.
(XS)LCL0—A known, scalar value or array of values from an in-control process to be used in place of calculated Lower Control Limit (LCL)values.
(XS)LCLLineStyle—A linestyle value for the LCL line. (defaults to solid)
(XS)LCLOut—A output variable into which you want the calculated LCL stored. If the sample sizes are not all identical, this value is an array. Otherwise it is scalar.
(XS)LCLThick—A thickness value for the LCL line. (Defaults to 1.0)
(XS)LCLColor—A color index for the LCL line. (Defaults to !P.COLOR)
Limit—The control limit expressed as multiples of sigma. (Defaults to 3)
Max_Levels—Set the maximum number of levels on a Date/Time axis. For more details, see the PV-WAVE PLOT Procedures on page 904.
(XS)MeanOut—A output variable into which you wish the calculated mean stored.
NoAnnot—Toggle to suppress annotation.
(XS)NoCLine—Toggle to suppress the central line.
(XS)NoLCL—Toggle to suppress the LCL line.
(XS)NoUCL—Toggle to suppress the Upper Control Limit(UCL) line.
(XS)PMean—Known Population mean. If this keyword is not provided the mean is calculated from the data.
PSigma—2D data: Not required
*For 1D data: An array containing a standard deviation for each sample in the input data.
(XS)PlotColor—A color index or array of color indices for the data points. (Defaults to !P.COLOR)
(XS)PlotLineStyle—Linestyle value for the data points. (Defaults to solid)
(XS)PlotThick—Line thickness value for the data plot. (Defaults to 1.0)
(XS)Points—An output variable into which to store the plotted points.
(XS)PSym—Plot symbol for the data points.
(XS)RefLinePoints—Data value or array of values along the Yaxis at which to place horizontal reference lines.
(XS)RefLineColor—Color index or array of color indices for the horizontal reference line(s).
(XS)RefLineStyle—Linestyle value or array of linestyle values for the horizontal reference line(s).
(XS)RefLineThick—Line thickness value or array of line thickness values for the horizontal reference lines.
(XS)RefLineLabel—String or array of strings used to label the horizontal reference line(s).
Sampn—1D input data: A scalar or array representing the number of observations in each sample. A scalar indicates the sample size is constant.
*2D input data: Not required.
Sigma0—Scalar value used in place of the calculated standard deviation.
SigmaOut—An output variable into which you want the estimated sigma value stored.
Start_Level—Specify the initial level of tick labels to be displayed on a Date/Time axis. For more details, see the PV-WAVE PLOT Procedures on page 904.
(XS)Tickformat—Format specifier for the tick labels on the Y axis.
Title—String for the plot title.
(XS)UCL0—A known, scalar Upper Control Limit (UCL) from an in-control process to be used in place of calculated values.
(XS)UCLLineStyle—A scalar linestyle value for the UCL line.
(XS)UCLOut—An output variable into which you want the calculated UCL stored. If the sample sizes are not all identical, this value is an array. Otherwise it is scalar.
(XS)UCLThick—Scalar thickness value for the UCL line.
(XS)UCLColor—A color index for the UCL line.
XRange—A two element integer array for the range of the X axes. Ignored for Date/Time Axes.
XSize—The width of the plot window in pixels. Must be accompanied by the 'YSize' keyword. (Defaults to 640)
(XS)Ticklen—Controls the length of the X axes tick marks. For more details, see the PV-WAVE PLOT Procedures on page 904.
XTicks—Number of minor tick marks between the major ones on the X axes.
(XS)XTitle—String for title of the X axis.
TColor—Color index for X, R and main titles.
YSize—The height of the plot window in pixels. Must be accompanied by the 'XSize' keyword. (Defaults to 512)
(XS)YTitle—String for title of Y axis.
(XS)YTicks—Number of major tickmarks on the Y axis.
Example
This example creates a sample x observations(6x3) array.
run1 = [15.09, 15.17, 14.99]
run2 = [14.87, 15.46, 15.01]
run3 = [15.00, 15.13, 14.68]
run4 = [14.94, 15.15, 14.69]
run5 = [14.65, 15.02, 15.12]
run6 = [15.01, 15.08, 15.13]
run = TRANSPOSE([[run1], [run2], [run3], $
                 [run4], [run5], [run6]])
; Chart shows a process within the std 3-sigma control limits
XSCHART, run, Title='XS Chart'
See Also