XBar
XBar using Control Chart
Example 1
Summary: Creates a control chart with XBar plot and box plots for height, using a sample size of 5 and K-Sigma level of 3.
Code:
Open("data_table.jmp");
Control Chart( Sample Size( 5 ), KSigma( 3 ), Chart Col( :height, XBar( Box Plots( 1 ), Connect Points( 0 ) ) ), );
Code Explanation:
- Open data table.
- Create control chart.
- Set sample size to 5.
- Define K-Sigma level as 3.
- Add height column to chart.
- Use XBar plot for height.
- Enable box plots for XBar.
- Disable point connections in XBar.
Example 2
Summary: Creates a control chart for DIAMETER data, with XBar and S charts applied to Phase 1 and Phase 2, using JMP's Control Chart platform.
Code:
dt under test = Open("data_table.jmp");
obj = Control Chart(
Phase( :Phase ),
Sample Label( :DAY ),
KSigma( 3 ),
Chart Col( :DIAMETER, XBar( Phase Level( "1" ), Phase Level( "2" ) ), S( Phase Level( "1" ), Phase Level( "2" ) ) )
);
Code Explanation:
- Open data_table data
- Create control chart object.
- Set phase variable.
- Define sample label.
- Set KSigma to 3.
- Add DIAMETER column.
- Apply XBar chart for Phase 1.
- Apply XBar chart for Phase 2.
- Apply S chart for Phase 1.
- Apply S chart for Phase 2.
Example 3
Summary: Creates a control chart object with customized settings, including sample label column, K-Sigma limits, and report appearance.
Code:
dt under test = Open("data_table.jmp");
obj = Control Chart(
Sample Label( :Sample ),
KSigma( 3 ),
Chart Col( :Weight, XBar( Show Zones( 1 ), Limits Precision( -1 ) ), R ),
SendToReport(
Dispatch( {"XBar of Weight"}, "Variables Control Chart of XBar", FrameBox,
{Grid Line Order( 4 ), Reference Line Order( 5 ), DispatchSeg( CustomStreamSeg( 2 ), {Line Width( 3 )} ),
DispatchSeg( CustomStreamSeg( 3 ), {Line Width( 3 )} )}
)
)
);
Code Explanation:
- Open data table.
- Create control chart object.
- Set sample label column.
- Define control limits.
- Add XBar and R charts.
- Customize report appearance.
- Adjust grid line order.
- Adjust reference line order.
- Set custom line width for segments.
- Apply custom settings.
Example 4
Summary: Creates a control chart for :Weight, with XBar and R charts, and customizes the appearance with needle display, zone shading, and frame adjustments.
Code:
dt under test = Open("data_table.jmp");
obj = Control Chart(
Sample Label( :Sample ),
KSigma( 3 ),
Chart Col( :Weight, XBar( Needle( 1 ), Connect Points( 0 ), Shade Zones( 1 ), Limits Precision( -1 ) ), R ),
SendToReport(
Dispatch( {}, "Variables Control Chart", OutlineBox,
{Set Title( "Needle, Show Points, Show Center Line, Show Control Limits, Shade Zones" )}
),
Dispatch( {"XBar of Weight"}, "Variables Control Chart of XBar", FrameBox,
{DispatchSeg( CustomStreamSeg( 2 ), {Line Width( 3 )} ), DispatchSeg( CustomStreamSeg( 3 ), {Line Width( 3 )} )}
),
Dispatch( {"XBar of Weight"}, FrameBox( 2 ), {Frame Size( 53, 208 )} ),
Dispatch( {"R of Weight"}, FrameBox( 2 ), {Frame Size( 53, 208 )} )
)
);
Code Explanation:
- Open data table;
- Create control chart object.
- Set sample label to :Sample.
- Define KSigma value as 3.
- Add XBar chart for :Weight.
- Enable needle display.
- Disable point connection.
- Enable zone shading.
- Set limits precision to -1.
- Add R chart for :Weight.
- Set chart title.
- Adjust XBar frame line width.
- Adjust R frame size.
Example 5
Summary: Creates a control chart to monitor and analyze diameter data, utilizing phase levels and sample labels.
Code:
dt = Open("data_table.jmp");
dt << select rows( [1] );
dt << delete rows;
obj = dt << Control Chart(
Phase( :Phase ),
Sample Label( Column( dt, "DAY" ) ),
KSigma( 3 ),
Chart Col(
:DIAMETER,
XBar( Point Marker( 11 ), Phase Level( "1" ), Phase Level( "2" ) ),
R( Point Marker( 11 ), Phase Level( "1" ), Phase Level( "2" ) )
)
);
rpt = obj << report;
Code Explanation:
- Open data table.
- Select first row.
- Delete selected row.
- Create control chart object.
- Set phase variable.
- Set sample label column.
- Define KSigma value.
- Add diameter column to chart.
- Configure XBar plot settings.
- Configure R plot settings.
XBar using Add Column Properties
Example 1
Summary: Adds control limits to a height column in a JMP data table, setting average to 60, lower control limit to 50, and upper control limit to 70.
Code:
dt = Open("data_table.jmp");
:height << Add Column Properties( Set Property( "Control Limits", {XBar( Avg( 60 ), LCL( 50 ), UCL( 70 ) )} ) );
prpties = :height << Get Column Properties;
Code Explanation:
- Open data table.
- Access height column.
- Add control limits properties.
- Set average to 60.
- Set lower control limit to 50.
- Set upper control limit to 70.
- Retrieve column properties.
Example 2
Summary: Adds control limits to a height column in a data table, setting XBar average to 60, LCL to 50, and UCL to 70.
Code:
dt2 = Open("data_table.jmp");
:height << Add Column Properties( Set Property( "Control Limits", {XBar( Avg( 60 ), LCL( 50 ), UCL( 70 ) )} ) );
prop = :height << get column properties();
Code Explanation:
- Open data table;
- Access height column.
- Add control limits property.
- Set XBar average to 60.
- Set LCL to 50.
- Set UCL to 70.
- Retrieve column properties.