XBAR Procedure
Creates an X Bar chart. 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
XBAR, 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' or 'PRange' 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—A color index for the chart annotation. (Defaults to !P.COLOR)
Background—A color index for the plot background.
CLineColor—A color index for the central(mean) line. (Defaults to !P.COLOR)
CLineStyle—A linestyle value for the central line. (Defaults to solid)
ClineThick—A thickness value for the central line. (Defaults to 1.0)
Color—A color index for the plot axes. (Defaults to !P.COLOR)
DTarray—an array of Date/Time variables to be used for the X axis.
LCL0—A known, scalar value or array of values for the Lower Control Limit (LCL). Taken from an in-control process to be used in place of calculated values.
LCLLineStyle—A linestyle value for the LCL line, defaults to solid.
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.
LCLThick—A thickness value for the LCL line. (Defaults to 1.0)
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.
MeanOut—A output variable into which you wish the calculated mean stored.
NoAnnot—Toggle to suppress annotation.
NoCLine—Toggle to suppress the central line.
NoLCL—Toggle to suppress the LCL line.
NoUCL—Toggle to suppress the Upper Control Limit(UCL) line.
PMean—Known Population mean. If this keyword is not provided the mean is calculated from the data.
PRange—2D data: Not required.
*For 1D data: An array with the known range of each sample. If 'PSigma' is not provided, these values will be used to estimate the sample standard deviation.
PSigma—For 2D data: Scalar value to override the calculation of the standard deviation.
*For 1D data: An array containing a standard deviation for each sample mean in the input data.
PlotColor—A color index or array of color indices for the data points. (Defaults to !P.COLOR)
PlotLineStyle—A linestyle value for the data points. (Defaults to solid)
PlotThick—Line thickness value for the data plot, defaults to 1.0
PSym—Plot symbol for the data points.
RangeStdev—2D data: A toggle indicating you wish to use the range of the sample values to estimate the sample standard deviation.
*For 1D data, this toggle is ignored and the sample stdev is estimated based on which of 'PSigma' or 'PRange' you provide, with 'PSigma' taking precedence.
RefLinePoints—Data value or array of values along the Yaxis at which to place horizontal reference lines.
RefLineColor—Color index or array of color indices for the horizontal reference line(s).
RefLineStyle—Linestyle value or array of linestyle values for the horizontal reference line(s).
RefLineThick—Line thickness value or array of line thickness values for the horizontal reference lines.
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.
SigmaOut—An output variable into which you want the estimated sigma value stored.
Start_Level—Specifies the initial level of tick labels to be displayed on a Date/Timeaxis. For more details, see the PV-WAVE PLOT Procedures.
Tickformat—Format specifier for the tick labels on the Y axis.
Title—String for the plot title.
UCL0—A known, scalar value or array of values for the Upper Control Limit. Taken from an in-control process to be used in place of calculated values.
UCLLineStyle—A scalar linestyle value for the UCL line.
UCLOut—An output variable into which you want the calculated Upper Control limit stored. If the sample sizes are not all identical, this value is an array. Otherwise it is scalar.
UCLThick—Scalar thickness value for the UCL line.
UCLColor—A color index for the UCL line.
XPoints—An output variable to store the plotted points.
Xrange—Two element integer array for the range of the x-axis. Ignored for Date/Time Axes.
XSize—The width of the plot window in pixels. Must be accompanied by the 'YSize' keyword. (Defaults to 640)
XTitle—String for title of the X axis.
Xticks—Number of major tickmarks on the X axis.
YSize—The height of the plot window in pixels. Must be accompanied by the 'XSize' keyword. (Defaults to 512)
YTitle—String for title of Y axis.
YTicks—Number of major tickmarks on the Y axis.
Example
; 3 observations each, from 6 samples
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]
; We want a samples x observations(6x3) array.
run = TRANSPOSE([[run1], [run2], [run3], $
                 [run4], [run5], [run6]])
; Chart shows a process within the std 3-sigma
; control limits.
XBAR, run, Title='X Bar Chart'
See Also