public class ShewhartControlChart extends Data
ShewhartControlChart
is the base class for the Shewhart control charts.
The control limits are generally calculated as
where the meaning of center and depend on the specific control chart being drawn. The variable k is the value of the attribute "ControlLimit" associated with the line being drawn. Typically there are three lines with .If all of the samples sizes are equal, the lines are horizontal.
If the sample sizes are unequal, the lines have a "stairstep" pattern.
Horizontal lines have a title drawn just above the line and right-adjusted
on the chart. The contents of the title is determined by the line's
"Title" attribute. If the title contains the placeholder "{0}",
it is replaced by the lines value. This replacement is done using
MessageFormat
.
Modifier and Type | Field and Description |
---|---|
static double[] |
d2
This field contains
the mean of the ranges of
n samples from a Gaussian distribution.
|
static double[] |
d3
This field contains
the standard deviation of the ranges of
n samples from a Gaussian distribution.
|
AXIS_X_TOP, AXIS_Y_RIGHT, BAR_TYPE_HORIZONTAL, BAR_TYPE_VERTICAL, DASH_PATTERN_DASH, DASH_PATTERN_DASH_DOT, DASH_PATTERN_DOT, DASH_PATTERN_SOLID, DATA_TYPE_FILL, DATA_TYPE_LINE, DATA_TYPE_MARKER, DATA_TYPE_PICTURE, DATA_TYPE_TUBE, DENDROGRAM_TYPE_HORIZONTAL, DENDROGRAM_TYPE_VERTICAL, FILL_TYPE_GRADIENT, FILL_TYPE_NONE, FILL_TYPE_PAINT, FILL_TYPE_SOLID, LABEL_TYPE_PERCENT, MARKER_TYPE_ASTERISK, MARKER_TYPE_CIRCLE_CIRCLE, MARKER_TYPE_CIRCLE_PLUS, MARKER_TYPE_CIRCLE_X, MARKER_TYPE_DIAMOND_PLUS, MARKER_TYPE_FILLED_CIRCLE, MARKER_TYPE_FILLED_DIAMOND, MARKER_TYPE_FILLED_SQUARE, MARKER_TYPE_FILLED_TRIANGLE, MARKER_TYPE_HOLLOW_CIRCLE, MARKER_TYPE_HOLLOW_DIAMOND, MARKER_TYPE_HOLLOW_SQUARE, MARKER_TYPE_HOLLOW_TRIANGLE, MARKER_TYPE_OCTAGON_PLUS, MARKER_TYPE_OCTAGON_X, MARKER_TYPE_PLUS, MARKER_TYPE_SQUARE_PLUS, MARKER_TYPE_SQUARE_X, MARKER_TYPE_X, TEXT_X_CENTER, TEXT_X_LEFT, TEXT_X_RIGHT, TEXT_Y_BOTTOM, TEXT_Y_CENTER, TEXT_Y_TOP
AUTOSCALE_DATA, AUTOSCALE_DENSITY, AUTOSCALE_NUMBER, AUTOSCALE_OFF, AUTOSCALE_WINDOW, AXIS_X, AXIS_Y, AXIS_Z, LABEL_TYPE_NONE, LABEL_TYPE_TITLE, LABEL_TYPE_X, LABEL_TYPE_Y, LABEL_TYPE_Z, TRANSFORM_CUSTOM, TRANSFORM_LINEAR, TRANSFORM_LOG
Constructor and Description |
---|
ShewhartControlChart(AxisXY axis)
Constructs a Shewhart control chart.
|
Modifier and Type | Method and Description |
---|---|
ControlLimit |
addCenterLine()
Adds the center line to the control chart
and returns the newly added line.
|
ControlLimit |
addControlLimit()
Adds a control limit to the chart.
|
ControlLimit |
addLowerControlLimit()
Creates lower
ControlLimit ,
adds it to the control chart,
and returns the newly created object. |
ControlLimit |
addUpperControlLimit()
Creates upper
ControlLimit ,
adds it to the control chart,
and returns the newly created object. |
ControlLimit[] |
addWecoLimits()
Adds lines for the Western Electric Company Rules.
|
void |
dataRange(double[] range)
Update the data range,
range = {xmin,xmax,ymin,ymax} . |
double |
getCenter()
Returns the value of the attribute "Center".
|
ControlLimit |
getCenterLine()
Returns the center line.
|
Data |
getControlData()
Returns the
Data object for the control data. |
ControlLimit |
getLowerControlLimit()
Returns the lower control limit.
|
double |
getMeanSampleSize()
Returns the value of the attribute "MeanSampleSize".
|
int[] |
getSampleSize()
Returns the value of the attribute "SampleSize".
|
ControlLimit |
getUpperControlLimit()
Returns the upper control limit.
|
void |
paint(Draw draw)
Paints this node and all of its children.
|
void |
removeControlLimit(ControlLimit line)
Removes a control limit from the chart.
|
void |
setCenter(double center)
Sets the value of the attribute "Center".
|
Data |
setData(double[] y)
Sets the data in the control chart.
|
Data |
setData(int[] y)
Sets the integer data in the control chart.
|
void |
setSampleSize(int sampleSize)
Sets the value of the attribute "SampleSize".
|
void |
setSampleSize(int[] sampleSize)
Sets the value of the attribute "SampleSize".
|
void |
setX(double[] x)
Sets the x-coordinates of the data.
|
formatLabel
addPickListener, firePickListeners, getALT, getAxis, getBackground, getBarGap, getBarType, getBarWidth, getChart, getChartTitle, getChildren, getClipData, getComponent, getConcatenatedViewport, getDataType, getDoubleBuffering, getExplode, getFillOutlineColor, getFillOutlineType, getFillPaint, getFillType, getGradient, getHREF, getLegend, getLineDashPattern, getMarkerDashPattern, getMarkerThickness, getMarkerType, getParent, getReference, getScreenAxis, getScreenSize, getScreenViewport, getSize, getSkipWeekends, getTextAngle, getTextColor, getTitle, getToolTip, getViewport, isBitSet, prePaint, removePickListener, setALT, setBarGap, setBarType, setBarWidth, setChartTitle, setClipData, setCustomTransform, setDataType, setDoubleBuffering, setExplode, setFillOutlineColor, setFillOutlineColor, setFillOutlineType, setFillPaint, setFillPaint, setFillPaint, setFillType, setGradient, setGradient, setGradient, setHREF, setImage, setLineDashPattern, setMarkerDashPattern, setMarkerThickness, setMarkerType, setReference, setScreenSize, setSize, setSkipWeekends, setTextAngle, setTextColor, setTextColor, setTitle, setTitle, setToolTip, setViewport, setViewport
clone, clone, clone, clone, getAbstractParent, getAttribute, getAutoscaleInput, getAutoscaleMinimumTimeInterval, getAutoscaleOutput, getBooleanAttribute, getChildList, getColorAttribute, getCustomTransform, getDensity, getDoubleAttribute, getFillColor, getFont, getFontName, getFontSize, getFontStyle, getImage, getIntegerAttribute, getLabelType, getLightColor, getLineColor, getLineWidth, getLocale, getMarkerColor, getMarkerSize, getName, getNumber, getPaint, getStringAttribute, getTextFormat, getTickLength, getTransform, getX, getY, isAncestorOf, isAttributeSet, isAttributeSetAtThisNode, parseColor, remove, setAttribute, setAutoscaleInput, setAutoscaleMinimumTimeInterval, setAutoscaleOutput, setDensity, setFillColor, setFillColor, setFont, setFontName, setFontSize, setFontStyle, setImage, setLabelType, setLightColor, setLightColor, setLineColor, setLineColor, setLineWidth, setLocale, setMarkerColor, setMarkerColor, setMarkerSize, setName, setNumber, setPaint, setTextFormat, setTextFormat, setTickLength, setTransform, setX, setY, toString
public static final double[] d2
NaN
because these values
are not defined.
Valid entries in the table are for n=2 through 50.public static final double[] d3
NaN
because these values
are not defined.
Valid entries in the table are for n=2 through 50.public ShewhartControlChart(AxisXY axis)
axis
- the AxisXY
parent of this nodepublic ControlLimit addCenterLine()
ControlLimit
which draws the center line.public ControlLimit addControlLimit()
ControlLimit
object.public ControlLimit addLowerControlLimit()
ControlLimit
,
adds it to the control chart,
and returns the newly created object.ControlLimit
which draws the lower control limit line.public ControlLimit addUpperControlLimit()
ControlLimit
,
adds it to the control chart,
and returns the newly created object.ControlLimit
which draws the upper control limit line.public ControlLimit[] addWecoLimits()
ControlLimit
corresponding to k = -2 first and
the ControlLimit
corresponding to k = +2 last.public void dataRange(double[] range)
range = {xmin,xmax,ymin,ymax}
.
The entries in range are updated to reflect the extent of
the data in this node.
The argument range
is an input/output variable. Its value should be
updated only if the data in this node is outside the range
already in the array.public double getCenter()
public ControlLimit getCenterLine()
ControlLimit
which draws the center line.public Data getControlData()
Data
object for the control data.Data
object for charting the control data.public ControlLimit getLowerControlLimit()
ControlLimit
which draws the lower control limit line.public double getMeanSampleSize()
public int[] getSampleSize()
new int[]{1}
).public ControlLimit getUpperControlLimit()
ControlLimit
which draws the upper control limit line.public void paint(Draw draw)
public void removeControlLimit(ControlLimit line)
line
- is the ControlLimit
object to be removed from this chart.public void setCenter(double center)
center
- is the value of the attribute "Center".public Data setData(double[] y)
y
- is an array containing the data values.Data
object containing the data points.public Data setData(int[] y)
y
- is an array containing the data values.Data
object containing the data points.public void setSampleSize(int sampleSize)
new int[]{1}
).sampleSize
- is the value of the attribute "SampleSize".public void setSampleSize(int[] sampleSize)
sampleSize
- is the value of the attribute "SampleSize".public void setX(double[] x)
ControlLimit
added to this chart is also set.
If not set the values 0, 1, 2, ... are used.x
- is an array containing the x-coordinates. The length of
x
must equal the length of the data array used to construct
this object.Copyright © 1970-2015 Rogue Wave Software
Built October 13 2015.