Control Chart Builder
Example 1
Summary: Creates a control chart with specific limits and reference lines using JMP's Control Chart Builder platform.
Code:
// Control Chart Builder
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder
Control Chart Builder(
Variables( Y( :Y ) ),
Chart(
Position( 1 ),
Limits( Spec Limits( 1 ) )
),
Chart( Position( 2 ) ),
SendToReport(
Dispatch( {}, "Y", ScaleBox,
{
Add Ref Line(
208, Solid, "Blue", "LSL",
2
),
Add Ref Line(
248, Solid, "Blue", "USL",
2
),
Add Ref Line(
228, Solid, "Blue",
"Target", 2
)}
)
)
);
Code Explanation:
- Open table.
- Create control chart.
- Set Y variable.
- Configure first chart.
- Set spec limits.
- Configure second chart.
- Send report settings.
- Add LSL reference line.
- Add USL reference line.
- Add target reference line.
Example 2
Summary: Creates a Control Chart Builder with two charts, specifying subgroup and Y variables, and adding reference lines for LSL, USL, and Target.
Code:
// Control Chart Builder 2
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder 2
Control Chart Builder(
Size( 524, 446 ),
Show Control Panel( 0 ),
Variables(
Subgroup( :Lot ),
Y( :X )
),
Chart( Position( 1 ) ),
Chart( Position( 2 ) ),
SendToReport(
Dispatch( {}, "X", ScaleBox,
{
Add Ref Line(
107, "Solid", "Blue",
"LSL", 1
),
Add Ref Line(
147, "Solid", "Blue",
"USL", 1
),
Add Ref Line(
127, "Solid", "Blue",
"Target", 1
)}
)
)
);
Code Explanation:
- Open data table.
- Create Control Chart Builder.
- Set chart size.
- Hide control panel.
- Define subgroup variable.
- Define Y variable.
- Add first chart.
- Add second chart.
- Send report dispatch.
- Add LSL reference line.
- Add USL reference line.
- Add target reference line.
Example 3
Summary: Generates a Control Chart Builder G Chart to visualize and analyze the count of doses since last adverse event (ADE) over time, with limits set using negative binomial sigma and warnings for test beyond limits.
Code:
// Control Chart Builder G Chart
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder G Chart
Control Chart Builder(
Show Control Panel( 0 ),
Class( "Rare Event" ),
Variables(
Subgroup( :Date of ADE ),
Y( :Doses since Last ADE )
),
Chart(
Points( Statistic( "Count" ) ),
Limits(
Sigma( "Negative Binomial" )
),
Warnings(
Test Beyond Limits( 1 )
)
)
);
Code Explanation:
- Open data table.
- Initialize Control Chart Builder.
- Hide control panel.
- Set class variable.
- Define subgroup variable.
- Define Y variable.
- Plot points using count statistic.
- Set limits using negative binomial sigma.
- Enable test beyond limits warning.
- Display chart.
Example 4
Summary: Uses the Control Chart Builder to visualize and analyze data from a table, creating two Shewhart charts with average points and range limits.
Code:
// Control Chart Builder
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder
Control Chart Builder(
Show Control Panel( 0 ),
Variables(
"Subgroup"(:Day), "Y"(:Delay)
),
Chart(
Position( 1 ),
Points( Statistic( "Average" ) ),
Limits( Sigma( "Range" ) ),
Connecting Line( 1 )
),
Chart(
Position( 2 ),
Points( Statistic( "Range" ) ),
Limits( Sigma( "Range" ) ),
Connecting Line( 1 )
)
);
Code Explanation:
- Open table.
- Set control panel visibility.
- Define subgroup variable.
- Define Y variable.
- Create first chart.
- Set chart position.
- Plot average points.
- Add range limits.
- Enable connecting lines.
- Create second chart.
Example 5
Summary: Creates a Control Chart Builder NP chart to visualize and analyze the count points of a binomial distribution, utilizing the Shewhart Attribute class and hiding the control panel.
Code:
// Control Chart Builder NP Chart
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder NP Chart
Control Chart Builder(
Show Control Panel( 0 ),
Class( "Shewhart Attribute" ),
Variables(
Subgroup( :Sample ),
Y( :Status )
),
Chart(
Points( Statistic( "Count" ) ),
Limits( Sigma( "Binomial" ) )
)
);
Code Explanation:
- Open data table.
- Initialize Control Chart Builder.
- Hide control panel.
- Set chart type to Shewhart Attribute.
- Define subgroup variable.
- Define response variable.
- Plot count points.
- Set limits using binomial distribution.
- Build the control chart.
- Display the chart.
Example 6
Summary: Creates a Shewhart Attribute control chart using the Control Chart Builder platform in JMP, with a focus on visualizing the proportion of 'Status' over 'Sample' subgroups.
Code:
// Control Chart Builder P Chart
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder P Chart
Control Chart Builder(
Show Control Panel( 0 ),
Class( "Shewhart Attribute" ),
Variables(
Subgroup( :Sample ),
Y( :Status ),
Phase( :Phase )
),
Chart(
Points(
Statistic( "Proportion" )
),
Limits( Sigma( "Binomial" ) )
)
);
Code Explanation:
- Open data table.
- Initialize Control Chart Builder.
- Hide control panel.
- Set chart type to Shewhart Attribute.
- Define subgroup variable.
- Define Y variable.
- Define phase variable.
- Add points statistic.
- Set limits to Binomial.
- Build the control chart.
Example 7
Summary: Creates a U Chart control chart builder in JMP, specifying subgroup by date, Y variable as number of defects, and n trials as unit size.
Code:
// Control Chart Builder: U Chart
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder: U Chart
Control Chart Builder(
Sort by Row Order( 1 ),
Class( "Shewhart Attribute" ),
Variables(
Subgroup( :Date ),
Y( :"# defects"n ),
n Trials( :Unit size )
),
Chart(
Points(
Statistic( "Proportion" )
),
Limits( Sigma( "Poisson" ) )
)
);
Code Explanation:
- Open table.
- Create control chart builder.
- Sort by row order.
- Set chart type to Shewhart Attribute.
- Define subgroup variable.
- Define Y variable.
- Define n Trials variable.
- Add points to chart.
- Set statistic to Proportion.
- Set limits to Poisson Sigma.
Example 8
Summary: Creates a Shewhart attribute control chart using JMP's Control Chart Builder, specifying subgroup, Y, and phase variables, and plotting points with a binomial limit method.
Code:
// Control Chart Builder
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder
Control Chart Builder(
SHow control panel( 0 ),
Class( "Shewhart Attribute" ),
Variables(
Subgroup( :Lot Number ),
Y( :Type of Defect ),
Phase( :Date )
),
Chart(
Points( Statistic( "Count" ) ),
Limits( Sigma( "Binomial" ) )
)
);
Code Explanation:
- Open table.
- Create control chart.
- Hide control panel.
- Set chart type.
- Define subgroup variable.
- Define Y variable.
- Define phase variable.
- Plot points.
- Set point statistic.
- Set limit method.
Example 9
Summary: Generates a Mean and Range Chart using Control Chart Builder to visualize the distribution of 'Weight' values across 'Subgroup' samples, with connecting lines enabled.
Code:
// Mean and Range Charts
// Open data table
dt = Open("data_table.jmp");
// Mean and Range Charts
Control Chart Builder(
Show Control Panel( 0 ),
Variables(
"Subgroup"(:Sample), "Y"(:Weight)
),
Chart(
Position( 1 ),
Points( Statistic( "Average" ) ),
Limits( Sigma( "Range" ) ),
Connecting Line( 1 )
),
Chart(
Position( 2 ),
Points( Statistic( "Range" ) ),
Limits( Sigma( "Range" ) ),
Connecting Line( 1 )
)
);
Code Explanation:
- Open data table.
- Create control chart builder.
- Hide control panel.
- Set subgroup variable.
- Set Y variable.
- Add first chart.
- Set chart position.
- Plot average points.
- Set range limits.
- Enable connecting lines.
Example 10
Summary: Generates a Short Run chart of Weight using Control Chart Builder, with the class set to Short Run and variables for Weight and Product.
Code:
// Short Run chart of Weight
// Open data table
dt = Open("data_table.jmp");
// Short Run chart of Weight
Control Chart Builder(
Class( Short Run ),
Variables(
Y( :Weight ),
Part( :Product )
),
Chart(
Position( 2 ),
Points(
Statistic(
"Moving Range Centered"
)
)
),
Show Control Panel( 0 )
);
Code Explanation:
- Open data table.
- Create Control Chart Builder.
- Set class to Short Run.
- Add Weight variable.
- Add Product part.
- Position chart at 2.
- Add Moving Range Centered points.
- Hide control panel.
Example 11
Summary: Visualizes a control chart using the Control Chart Builder, with two charts displaying average and range values for the 'DIAMETER' variable, grouped by 'DAY'.
Code:
// Control Chart Builder
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder
Control Chart Builder(
Show Control Panel( 0 ),
Variables(
"Subgroup"(:DAY), "Y"(:DIAMETER)
),
Chart(
Position( 1 ),
Points( Statistic( "Average" ) ),
Limits( Sigma( "Range" ) ),
Connecting Line( 1 )
),
Chart(
Position( 2 ),
Points( Statistic( "Range" ) ),
Limits( Sigma( "Range" ) ),
Connecting Line( 1 )
)
);
Code Explanation:
- Open table.
- Initialize Control Chart Builder.
- Hide control panel.
- Set subgroup variable.
- Set Y variable.
- Create first chart.
- Position first chart.
- Plot average points.
- Set range limits.
- Enable connecting lines.
Example 12
Summary: Visualizes XBar phases by creating a Control Chart Builder with two charts, displaying average and range statistics, and connecting lines.
Code:
// XBar Phases
// Open data table
dt = Open("data_table.jmp");
// XBar Phases
Control Chart Builder(
Show Control Panel( 1 ),
Variables(
"Subgroup"(:DAY), "Y"(:DIAMETER),
"Phase"(:Phase)
),
Chart(
Position( 1 ),
Points( Statistic( "Average" ) ),
Limits( Sigma( "Range" ) ),
Connecting Line( 1 )
),
Chart(
Position( 2 ),
Points( Statistic( "Range" ) ),
Limits( Sigma( "Range" ) ),
Connecting Line( 1 )
)
);
Code Explanation:
- Open table.
- Create control chart builder.
- Show control panel.
- Set variables: subgroup, Y, phase.
- Add first chart.
- Set position 1.
- Plot average points.
- Set range limits.
- Enable connecting lines.
- Add second chart.
Example 13
Summary: Visualizes a P chart for N Defective Week Subgrouping, using Control Chart Builder to plot proportion statistics with binomial limits.
Code:
// P chart of N Defective Week Subgrouping
// Open data table
dt = Open("data_table.jmp");
// P chart of N Defective Week Subgrouping
Control Chart Builder(
Size( 534, 450 ),
Show Control Panel( 0 ),
Class( Shewhart Attribute ),
Variables(
Subgroup( :Week ),
Y( :N Defective ),
n Trials( :N Units )
),
Chart(
Points(
Statistic( "Proportion" )
),
Limits( Sigma( "Binomial" ) )
),
SendToReport(
Dispatch( {}, "N Defective",
ScaleBox,
{Min( -0.000843572386136978 ),
Max( 0.1 ), Inc( 0.01 ),
Minor Ticks( 1 )}
)
)
);
Code Explanation:
- Open data table.
- Create control chart builder.
- Set size to 534x450.
- Hide control panel.
- Use Shewhart attribute class.
- Define subgroup as Week.
- Define Y variable as N Defective.
- Define n Trials as N Units.
- Plot proportion statistic.
- Use binomial limits.
Example 14
Summary: Visualizes a P' chart for N Defective Week Subgrouping, utilizing Control Chart Builder to plot proportion statistics with Laney P Prime limits.
Code:
// P' chart of N Defective Week Subgrouping
// Open data table
dt = Open("data_table.jmp");
// P' chart of N Defective Week Subgrouping
Control Chart Builder(
Size( 534, 450 ),
Show Control Panel( 0 ),
Class( Shewhart Attribute ),
Variables(
Subgroup( :Week ),
Y( :N Defective ),
n Trials( :N Units )
),
Chart(
Points(
Statistic( "Proportion" )
),
Limits(
Sigma( "Laney P Prime" )
)
),
SendToReport(
Dispatch( {}, "N Defective",
ScaleBox,
{Min( -0.000843572386136978 ),
Max( 0.1 ), Inc( 0.01 ),
Minor Ticks( 1 )}
)
)
);
Code Explanation:
- Open data table.
- Create control chart builder.
- Set size of chart.
- Hide control panel.
- Use Shewhart attribute class.
- Define subgroup variable.
- Define Y variable.
- Define n Trials variable.
- Plot proportion statistic.
- Use Laney P Prime limits.
Example 15
Summary: Generates a P chart of N Defective using Control Chart Builder, with variables for Week and N Units, to visualize the proportion of defective units over time.
Code:
// P chart of N Defective
// Open data table
dt = Open("data_table.jmp");
// P chart of N Defective
Control Chart Builder(
Size( 622, 305 ),
Show Control Panel( 0 ),
Class( Shewhart Attribute ),
Variables(
Subgroup( :Week ),
Subgroup(
:Weekday,
Position( 1 )
),
Y( :N Defective ),
n Trials( :N Units )
),
Chart(
Points(
Statistic( "Proportion" )
),
Limits( Sigma( "Binomial" ) )
),
SendToReport(
Dispatch( {}, "N Defective",
ScaleBox,
{Min( -0.00188665487286776 ),
Max( 0.140225884611048 ),
Inc( 0.02 ), Minor Ticks( 0 )
}
)
)
);
Code Explanation:
- Open table.
- Create control chart.
- Set chart size.
- Hide control panel.
- Define chart type.
- Assign subgroup variables.
- Add Y variable.
- Add n Trials variable.
- Set point statistic.
- Set limit method.
Example 16
Summary: Visualizes a P' chart of N Defective using Control Chart Builder, specifying subgroup variables and point statistic, while hiding the control panel.
Code:
// P' chart of N Defective
// Open data table
dt = Open("data_table.jmp");
// P' chart of N Defective
Control Chart Builder(
Size( 622, 305 ),
Show Control Panel( 0 ),
Class( Shewhart Attribute ),
Variables(
Subgroup( :Week ),
Subgroup(
:Weekday,
Position( 1 )
),
Y( :N Defective ),
n Trials( :N Units )
),
Chart(
Points(
Statistic( "Proportion" )
),
Limits(
Sigma( "Laney P Prime" )
)
),
SendToReport(
Dispatch( {}, "N Defective",
ScaleBox,
{Min( -0.00188665487286776 ),
Max( 0.140225884611048 ),
Inc( 0.02 ), Minor Ticks( 0 )
}
)
)
);
Code Explanation:
- Open data table.
- Create control chart builder.
- Set size of chart.
- Hide control panel.
- Define chart type.
- Specify subgroup variables.
- Add Y variable.
- Add n Trials variable.
- Set point statistic.
- Set limit method.
Example 17
Summary: Creates a Shewhart Attribute control chart to monitor flaws in bolts, using the Poisson distribution for limits and counting statistic for points.
Code:
// Control Chart Builder: C Chart
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder: C Chart
Control Chart Builder(
Show Control Panel( 0 ),
Class( "Shewhart Attribute" ),
Variables(
Subgroup( :Bolt ),
Y( :Flaws )
),
Chart(
Points( Statistic( "Count" ) ),
Limits( Sigma( "Poisson" ) )
)
);
Code Explanation:
- Open data table.
- Initialize control chart builder.
- Hide control panel.
- Set chart type to Shewhart Attribute.
- Define subgroup variable.
- Define response variable.
- Plot points using count statistic.
- Set limits using Poisson distribution.
- Display control chart.
Example 18
Summary: Visualizes individual and moving range charts using the Control Chart Builder, with specific settings for subgroup variable, Y variable, and Burnout scale.
Code:
// Control Chart Builder Individual and Moving Range Charts
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder Individual and Moving Range Charts
Control Chart Builder(
Show Control Panel( 0 ),
Variables(
Subgroup( :Burnout ),
Y( :Hours between Burnouts )
),
Chart(
Position( 1 ),
Limits( Spec Limits( 1 ) )
),
Chart( Position( 2 ) ),
SendToReport(
Dispatch( {}, "Burnout", ScaleBox,
{Min( 0 ), Max( 26 ),
Inc( 2 ), Minor Ticks( 0 )}
)
)
);
Code Explanation:
- Open data table.
- Create control chart builder.
- Hide control panel.
- Set subgroup variable.
- Set Y variable.
- Add first chart.
- Apply spec limits.
- Add second chart.
- Adjust Burnout scale.
- Set Burnout min to 0.
- Set Burnout max to 26.
- Set Burnout increment to 2.
- Disable minor ticks on Burnout.
Example 19
Summary: Opens a data table, creates a Control Chart Builder T Chart to visualize and analyze the 'Hours between Burnouts' variable by 'Burnout' subgroup, with limits set using the Weibull method.
Code:
// Control Chart Builder T Chart
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder T Chart
Control Chart Builder(
Class( "Rare Event" ),
Variables(
Subgroup( :Burnout ),
Y( :Hours between Burnouts )
),
Chart(
Points( Statistic( "Count" ) ),
Limits( Sigma( "Weibull" ) )
)
);
Code Explanation:
- Open data table.
- Create Control Chart Builder.
- Set class variable.
- Define subgroup variable.
- Define Y variable.
- Add points to chart.
- Set point statistic.
- Add limits to chart.
- Set limit method.
- Display chart.
Example 20
Summary: Opens a data table, creates a control chart with product statistics, and sets point statistic to 'Range Centered'.
Code:
// Short Run DNOM
// Open data table
dt = Open("data_table.jmp");
// Short Run DNOM
Control Chart Builder(
Show Product Separators( 0 ),
Class( Short Run ),
Variables(
Subgroup( :Box ),
Y( :"% Cocoa"n ),
Part( :Product )
),
Chart(
Position( 2 ),
Points(
Statistic( "Range Centered" )
)
),
Product Statistics(
:
"% Cocoa"n(
Product Level(
Milk Chocolate(
Target( 37 ),
Sigma(
3.76288031574307
)
),
Dark Chocolate(
Target( 70 ),
Sigma(
1.75728682873715
)
),
Extra Dark Chocolate(
Target( 85 ),
Sigma(
1.00725971457878
)
)
)
)
)
);
Code Explanation:
- Open data table.
- Create control chart.
- Hide product separators.
- Set class variable.
- Define subgroup variable.
- Define Y variable.
- Define part variable.
- Position chart element.
- Set point statistic.
- Configure product statistics.
Example 21
Summary: Generates a control chart builder to visualize the standardized values of '% Cocoa' for different products, with product separators turned off and warning test 1 enabled.
Code:
// Short Run Standardized
// Open data table
dt = Open("data_table.jmp");
// Short Run Standardized
Control Chart Builder(
Show Product Separators( 0 ),
Class( Short Run ),
Variables(
Subgroup( :Box, Position( 1 ) ),
Y( :"% Cocoa"n ),
Part( :Product )
),
Chart(
Position( 1 ),
Points(
Statistic( "Standardized" )
),
Warnings( Test 1( 1 ) )
),
Chart(
Position( 2 ),
Points(
Statistic( "Standardized" )
)
),
Product Statistics(
:
"% Cocoa"n(
Product Level(
Milk Chocolate(
Target( 37 ),
Sigma( 3.5 )
),
Dark Chocolate(
Target( 70 ),
Sigma( 1.5 )
),
Extra Dark Chocolate(
Target( 85 ),
Sigma( 1 )
)
)
)
)
);
Code Explanation:
- Open data table.
- Create control chart builder.
- Set product separators off.
- Define class as short run.
- Add subgroup variable.
- Add Y variable.
- Add part variable.
- Create first chart.
- Set points statistic to standardized.
- Enable warning test 1.
Example 22
Summary: Creates a Control Chart Builder NP chart to visualize and analyze the count-based status data, utilizing Shewhart Attribute class and binomial sigma limits.
Code:
// Control Chart Builder NP Chart
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder NP Chart
Control Chart Builder(
Show Control Panel( 0 ),
Class( Shewhart Attribute ),
Variables(
Subgroup( :Sample ),
Y( :Status )
),
Chart(
Points( Statistic( "Count" ) ),
Limits( Sigma( "Binomial" ) )
)
);
Code Explanation:
- Open data table.
- Create Control Chart Builder.
- Set control panel visibility off.
- Define chart type as Shewhart Attribute.
- Specify subgroup variable.
- Specify response variable.
- Plot points based on count.
- Set limits using binomial sigma.
- Display NP chart.
Example 23
Summary: Creates a control chart builder with Shewhart Attribute class, defining subgroup, Y, and phase variables, and adding points to the chart with Proportion statistic and Binomial Sigma limits.
Code:
// Control Chart Builder Phases
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder Phases
Control Chart Builder(
Show Control Panel( 0 ),
Class( Shewhart Attribute ),
Variables(
Subgroup( :Sample ),
Y( :Status ),
Phase( :Phase )
),
Chart(
Points(
Statistic( "Proportion" )
),
Limits( Sigma( "Binomial" ) )
)
);
Code Explanation:
- Open data table.
- Create control chart builder.
- Hide control panel.
- Set chart type to Shewhart Attribute.
- Define subgroup variable.
- Define Y variable.
- Define phase variable.
- Add points to chart.
- Set statistic to Proportion.
- Add limits using Binomial Sigma.
Example 24
Summary: Visualizes individual measurements and moving ranges using the Control Chart Builder, with two charts displaying Acid values and moving range limits.
Code:
// Individual Measurement Chart
// Open data table
dt = Open("data_table.jmp");
// Individual Measurement Chart
Control Chart Builder(
Show Control Panel( 0 ),
Variables( "Y"(:Acid) ),
Chart(
Position( 1 ),
Points(
Statistic( "Individual" )
),
Limits( Sigma( "Moving Range" ) ),
Connecting Line( 1 )
),
Chart(
Position( 2 ),
Points(
Statistic( "Moving Range" )
),
Limits( Sigma( "Moving Range" ) ),
Connecting Line( 1 )
)
);
Code Explanation:
- Open data table.
- Create Individual Measurement Chart.
- Hide control panel.
- Set Y variable to Acid.
- Add first chart.
- Position first chart.
- Plot individual points.
- Use moving range for limits.
- Enable connecting lines.
- Add second chart.
Example 25
Summary: Creates a Shewhart Attribute control chart using the Control Chart Builder platform in JMP, with count statistic and Poisson distribution limits.
Code:
// Control Chart Builder
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder
Control Chart Builder(
Show Control Panel( 0 ),
Class( "Shewhart Attribute" ),
Variables(
Subgroup( :Box ),
Y( :"# Defects"n )
),
Chart(
Points( Statistic( "Count" ) ),
Limits( Sigma( "Poisson" ) )
)
);
Code Explanation:
- Open data table.
- Create control chart builder.
- Hide control panel.
- Set chart type to Shewhart Attribute.
- Define subgroup variable.
- Define response variable.
- Plot points using count statistic.
- Set limits using Poisson distribution.
- Finalize chart configuration.
Example 26
Summary: Generates a Control Chart Builder to visualize and analyze the relationship between Thickness, Hour, and Cavity using average points and range limits.
Code:
// Control Chart Builder
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder
Control Chart Builder(
Variables(
"Subgroup"(:Hour),
"Y"(:Thickness), "Phase"(:Cavity)
),
Chart(
Position( 1 ),
Points( Statistic( "Average" ) ),
Limits( Sigma( "Range" ) ),
Connecting Line( 1 )
),
Chart(
Position( 2 ),
Points( Statistic( "Range" ) ),
Limits( Sigma( "Range" ) ),
Connecting Line( 1 )
),
SendToReport(
Dispatch( {}, "400", ScaleBox,
{Legend Model( 2 ),
Legend Model( 4 )}
),
Dispatch( {},
"Control Chart Builder",
FrameBox,
{
DispatchSeg(
Text Seg( 5 ),
{Line Color( "None" ),
Fill Color( "None" )}
),
DispatchSeg(
Text Seg( 6 ),
{Line Color( "None" ),
Fill Color( "None" )}
),
DispatchSeg(
Text Seg( 7 ),
{Line Color( "None" ),
Fill Color( "None" )}
),
DispatchSeg(
Text Seg( 8 ),
{Line Color( "None" ),
Fill Color( "None" )}
),
DispatchSeg(
Text Seg( 9 ),
{Line Color( "None" ),
Fill Color( "None" )}
),
DispatchSeg(
Text Seg( 10 ),
{Line Color( "None" ),
Fill Color( "None" )}
),
DispatchSeg(
Text Seg( 11 ),
{Line Color( "None" ),
Fill Color( "None" )}
),
DispatchSeg(
Text Seg( 12 ),
{Line Color( "None" ),
Fill Color( "None" )}
),
DispatchSeg(
Text Seg( 13 ),
{Line Color( "None" ),
Fill Color( "None" )}
),
DispatchSeg(
Text Seg( 14 ),
{Line Color( "None" ),
Fill Color( "None" )}
),
DispatchSeg(
Text Seg( 15 ),
{Line Color( "None" ),
Fill Color( "None" )}
),
DispatchSeg(
Text Seg( 16 ),
{Line Color( "None" ),
Fill Color( "None" )}
)}
)
)
);
Code Explanation:
- Open table.
- Define variables.
- Create control chart.
- Add average points.
- Set range limits.
- Enable connecting lines.
- Add range points.
- Set range limits.
- Enable connecting lines.
- Customize report appearance.
Example 27
Summary: Creates a P Chart control chart using JMP's Control Chart Builder, with variables for Lot, # defective, and Lot Size.
Code:
// Control Chart Builder: P Chart
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder: P Chart
Control Chart Builder(
Show Control Panel( 0 ),
Class( "Shewhart Attribute" ),
Variables(
Subgroup( :Lot ),
Y( :"# defective"n ),
n Trials( :Lot Size )
),
Chart(
Points(
Statistic( "Proportion" )
),
Limits( Sigma( "Binomial" ) )
)
);
Code Explanation:
- Open data table.
- Initialize Control Chart Builder.
- Hide control panel.
- Set chart type to Shewhart Attribute.
- Define subgroup variable.
- Define Y variable.
- Define n Trials variable.
- Add points to chart.
- Set statistic to Proportion.
- Set limits to Binomial.
Example 28
Summary: Creates a Non-Poisson (NP) control chart using JMP's Control Chart Builder, specifying subgroup and Y variables, and plotting points with count statistics.
Code:
// Control Chart Builder: NP Chart
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder: NP Chart
Control Chart Builder(
Show Control Panel( 0 ),
Class( "Shewhart Attribute" ),
Variables(
Subgroup( :Lot ),
Y( :"# defective"n ),
n Trials( :Lot Size )
),
Chart(
Points( Statistic( "Count" ) ),
Limits( Sigma( "Binomial" ) )
)
);
Code Explanation:
- Open data table.
- Create NP chart.
- Set control panel visibility.
- Define Shewhart attribute class.
- Specify subgroup variable.
- Specify Y variable.
- Specify n Trials variable.
- Plot points with count statistic.
- Set limits using Binomial sigma.
Example 29
Summary: Generates a P chart of Total Plastic using the Control Chart Builder platform in JMP, with specific settings for subgroup, Y variable, phase, and n Trials.
Code:
// P chart of Total Plastic
// Open data table
dt = Open("data_table.jmp");
// P chart of Total Plastic
Control Chart Builder(
Size( 814, 307 ),
Show Two Shewhart Charts( 0 ),
Show Control Panel( 0 ),
Show Limit Summaries( 0 ),
Class( Shewhart Attribute ),
Variables(
Subgroup( :Week ),
Y( :Total Plastic ),
Phase( :Location ),
n Trials( :Total Volume )
),
Chart(
Points(
Statistic( "Proportion" )
),
Limits(
Sigma( "Binomial" ),
Show Lower Limit( 0 )
)
),
SendToReport(
Dispatch( {},
"Control Chart Builder",
FrameBox,
{
DispatchSeg(
Text Seg( 1 ),
{Line Color( "None" ),
Fill Color( "None" )}
),
DispatchSeg(
Text Seg( 2 ),
{Line Color( "None" ),
Fill Color( "None" )}
),
DispatchSeg(
Text Seg( 3 ),
{Line Color( "None" ),
Fill Color( "None" )}
)}
)
)
);
Code Explanation:
- Open data table.
- Create P chart.
- Set chart size.
- Hide two Shewhart charts.
- Hide control panel.
- Hide limit summaries.
- Define chart type.
- Set subgroup variable.
- Set Y variable.
- Set phase variable.
- Set n Trials variable.
- Set point statistic.
- Set limit method.
- Hide lower limit.
- Customize text segments.
Example 30
Summary: Visualizes a Laney P' chart of Total Plastic using Control Chart Builder, specifying subgroup and Y variables, and sending the output to a report.
Code:
// Laney P' chart of Total Plastic
// Open data table
dt = Open("data_table.jmp");
// Laney P' chart of Total Plastic
Control Chart Builder(
Size( 814, 307 ),
Show Two Shewhart Charts( 0 ),
Show Control Panel( 0 ),
Show Limit Summaries( 0 ),
Class( Shewhart Attribute ),
Variables(
Subgroup( :Week ),
Y( :Total Plastic ),
Phase( :Location ),
n Trials( :Total Volume )
),
Chart(
Points(
Statistic( "Proportion" )
),
Limits(
Sigma( "Laney P Prime" ),
Show Lower Limit( 0 )
)
),
SendToReport(
Dispatch( {},
"Control Chart Builder",
FrameBox,
{
DispatchSeg(
Text Seg( 1 ),
{Line Color( "None" ),
Fill Color( "None" )}
),
DispatchSeg(
Text Seg( 2 ),
{Line Color( "None" ),
Fill Color( "None" )}
),
DispatchSeg(
Text Seg( 3 ),
{Line Color( "None" ),
Fill Color( "None" )}
)}
)
)
);
Code Explanation:
- Open data table.
- Create Laney P' chart.
- Set chart size.
- Hide two Shewhart charts.
- Hide control panel.
- Hide limit summaries.
- Define attribute chart.
- Specify subgroup variable.
- Specify Y variable.
- Specify phase variable.
Example 31
Summary: Creates a Control Chart Builder with Moving Average, utilizing Open data table and specifying subgroup and Y variables.
Code:
// Control Chart Builder: Moving Average
// Open data table
dt = Open("data_table.jmp");
// Control Chart Builder: Moving Average
Control Chart Builder(
Variables(
Subgroup( :Date ),
Y( :Moving Average )
),
Chart(
Position( 1 ),
Limits( Spec Limits( 1 ) )
),
Chart( Position( 2 ) ),
Show Control Panel( 0 )
);
Code Explanation:
- Open data table.
- Launch Control Chart Builder.
- Set subgroup variable.
- Set Y variable.
- Add first chart.
- Set chart position.
- Add limits.
- Add second chart.
- Set second chart position.
- Hide control panel.
Example 32
Summary: Visualizes a rare event control chart using the Control Chart Builder platform, with the goal of monitoring doses since last adverse event (ADE) over time.
Code:
Open("data_table.jmp");
Control Chart Builder(
Class( Rare Event ),
Variables( Subgroup( :Date of ADE ), Y( :Doses since Last ADE ) ),
Chart( Points( Statistic( "Count" ) ), Limits( Sigma( "Negative Binomial" ) ), Warnings( Test Beyond Limits( 1 ) ) ),
Show Control Panel( 0 ),
SendToReport( Dispatch( {}, "Doses since Last ADE Limit Summaries", OutlineBox, {Close( 1 )} ) )
);
Code Explanation:
- Open data table;
- Create control chart builder.
- Set chart type to rare event.
- Define subgroup variable.
- Define response variable.
- Plot count statistic.
- Use negative binomial limits.
- Enable test beyond limits.
- Hide control panel.
- Close limit summaries outline.
Example 33
Summary: Generates a control chart builder object to visualize and analyze data from a data table, with three charts displaying average, moving range on means, and standard deviation values.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Variables( Subgroup( :lot_id ), Y( :INM1 ) ),
Chart( Position( 1 ), Points( Statistic( "Average" ) ), Limits( Sigma( "Moving Range" ), Spec Limits( 0 ) ) ),
Chart( Position( 2 ), Points( Statistic( "Moving Range on Means" ) ), Limits( Sigma( "Moving Range" ), Spec Limits( 0 ) ) ),
Chart( Position( 3 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Standard Deviation" ), Spec Limits( 0 ) ) ),
Show Limit Labels( 1 )
);
rpt = obj << report;
Code Explanation:
- Open data table.
- Create control chart builder object.
- Set subgroup variable.
- Set Y variable.
- Add first chart with average points.
- Set limits for first chart.
- Add second chart with moving range points.
- Set limits for second chart.
- Add third chart with standard deviation points.
- Set limits for third chart.
- Show limit labels.
Example 34
Summary: Creates a Shewhart Attribute control chart to monitor the proportion of 'NO' values in a data table, with binomial sigma limits and one zone limit.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Class( Shewhart Attribute ),
Variables( Subgroup( :State, Position( 1 ) ), Y( :NO ), Phase( :Region ) ),
Chart( Points( Statistic( "Proportion" ) ), Limits( Sigma( "Binomial" ), Zones( 1 ) ) ),
Show Control Panel( 0 ),
SendToReport( Dispatch( {}, "NO Limit Summaries", OutlineBox, {Close( 1 )} ) )
);
rpt = obj << report;
Code Explanation:
- Open data table;
- Create Control Chart Builder object.
- Set chart type to Shewhart Attribute.
- Define subgroup variable as State.
- Set Y variable as NO.
- Define phase variable as Region.
- Plot proportion statistic points.
- Use binomial sigma limits.
- Enable one zone limit.
- Hide control panel.
- Close NO Limit Summaries outline box.
- Generate report object.
Example 35
Summary: Creates a control chart for gap analysis, connecting through missing values and displaying the chart in position 1.
Code:
Open("data_table.jmp");
Control Chart Builder(
Connect Thru Missing( 1 ),
Show Limit Summaries( 0 ),
Variables( Y( :Gap ) ),
Chart( Position( 1 ) ),
Show Control Panel( 0 )
);
Code Explanation:
- Open data table.
- Launch Control Chart Builder.
- Enable Connect Through Missing.
- Disable Limit Summaries display.
- Set Y variable to Gap.
- Place chart in position 1.
- Hide control panel.
Example 36
Summary: Creates a control chart builder with two charts and reference lines, utilizing the Control Chart Builder platform in JMP.
Code:
dt = Open("data_table.jmp");
ccb = Control Chart Builder(
Show Control Panel( 0 ),
Variables( Subgroup( :Day ), Y( :Delay ) ),
Chart( Position( 1 ) ),
Chart( Position( 2 ) ),
SendToReport(
Dispatch( {}, "Delay", ScaleBox,
{Add Ref Line( -10, DashDot, "Blue", "LSL", 2 ), Add Ref Line( 15, Solid, "Red", "Target", 2 ),
Add Ref Line( 40, Dashed, "Blue", "USL", 2 )}
),
Dispatch( {}, "Delay", ScaleBox( 2 ),
{Add Ref Line( -10, DashDot, "Blue", "LSL", 2 ), Add Ref Line( 15, Solid, "Red", "Target", 2 ),
Add Ref Line( 40, Dashed, "Blue", "USL", 2 )}
),
Dispatch( {}, "Control Chart Builder", FrameBox, {Marker Size( 2 )} ),
Dispatch( {}, "Control Chart Builder", FrameBox( 2 ), {Marker Size( 2 )} )
)
);
Code Explanation:
- Open data table.
- Create control chart builder.
- Hide control panel.
- Set subgroup variable.
- Set Y variable.
- Add first chart.
- Add second chart.
- Add reference lines to first scale.
- Add reference lines to second scale.
- Set marker size for first frame.
- Set marker size for second frame.
Example 37
Summary: Creates a control chart to monitor phase-specific diameter measurements, utilizing Control Chart Builder with subgrouping by day and response variable diameter.
Code:
Open("data_table.jmp");
Control Chart Builder( Variables( Subgroup( :DAY, Position( 1 ) ), Y( :DIAMETER ) ), Show Control Panel( 0 ), By( :Phase ) );
Code Explanation:
- Open data table.
- Launch Control Chart Builder.
- Specify subgroup variable.
- Set position for subgroup.
- Define response variable.
- Hide control panel.
- Group charts by phase.
Example 38
Summary: Creates a control chart builder object with specified window size, hidden control panel, and customized variables for subgroup and Y-axis.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables( Subgroup( :Date ), Y( :Gap ) ),
Chart( Position( 1 ), Points( Box Plots( 1 ) ) )
);
Code Explanation:
- Open data table.
- Create control chart builder object.
- Set window size.
- Hide control panel.
- Define subgroup variable.
- Define Y variable.
- Add chart to position 1.
- Display box plots for points.
Example 39
Summary: Creates a Control Chart Builder with multiple charts and filters to analyze data from a specific wafer lot.
Code:
dt = Open("data_table.jmp");
Control Chart Builder(
Size( 534, 464 ),
Show Control Panel( 0 ),
Variables( Subgroup( :lot_id ), Subgroup( :wafer, Position( 1 ) ), Y( :INM1 ) ),
Chart( Position( 1 ), Points( Statistic( "Average" ) ), Limits( Sigma( "Range" ) ) ),
Chart( Position( 2 ), Points( Statistic( "Range" ) ), Limits( Sigma( "Standard Deviation" ) ) ),
Chart( Position( 3 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Moving Range" ) ) ),
Chart( Position( 4 ), Points( Statistic( "Moving Range on Means" ) ), Limits( Sigma( "Median Moving Range" ) ) ),
Chart( Position( 5 ), Points( Statistic( "Moving Range on Std Dev" ) ), Limits( Sigma( "Median Moving Range" ) ) ),
Local Data Filter( Add Filter( columns( :wafer ), Where( :wafer == 1 ), Display( :wafer, Size( 157, 68 ), Height( 68 ) ) ) )
);
Code Explanation:
- Open data_table data
- Create control chart builder.
- Set window size.
- Hide control panel.
- Define subgroup variables.
- Add average chart.
- Add range chart.
- Add standard deviation chart.
- Add moving range chart.
- Add moving range on means chart.
- Add moving range on std dev chart.
- Apply local data filter.
Example 40
Summary: Creates a control chart for height, with two chart positions and row selection/exclusion capabilities.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder( Variables( Y( :height ) ), Chart( Position( 1 ) ), Chart( Position( 2 ) ) );
dt << select all rows << exclude;
Code Explanation:
- Open data table;
- Create control chart for height.
- Add first chart position.
- Add second chart position.
- Select all rows.
- Exclude selected rows.
Example 41
Summary: Creates a control chart with height as the Y variable, using Control Chart Builder to visualize and analyze data.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder( Variables( Y( :height ) ), Chart( Position( 1 ) ), Chart( Position( 2 ) ) );
dt << select all rows << exclude;
dt << clear select;
Code Explanation:
- Open data table.
- Create control chart object.
- Add height variable to chart.
- Position chart elements.
- Exclude all rows from analysis.
- Clear row selection.
Example 42
Summary: Creates a control chart builder object with specific variables and settings, enabling interactive visualization and analysis.
Code:
dt = Open("data_table.jmp");
dt << select rows( {15} ) << exclude;
obj = dt << Control Chart Builder(
Variables( Subgroup( :Sports ), Y( :Grade ), Phase( :Grades ) ),
Chart( Position( 1 ), Points( Individual Points( 1 ) ) )
);
Code Explanation:
- Open data table.
- Select row 15.
- Exclude selected row.
- Create control chart builder object.
- Set subgroup variable to Sports.
- Set Y variable to Grade.
- Set phase variable to Grades.
- Position chart at 1.
- Add individual points plot.
- Display control chart.
Example 43
Summary: Creates a control chart with multiple tests and report generation from a data table, utilizing Control Chart Builder in JMP.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Variables( Y( :Month Number ) ),
Chart(
Position( 1 ),
Limits( Spec Limits( 1 ) ),
Warnings( Test 1( 1 ), Test 2( 1 ), Test 3( 1 ), Test 4( 1 ), Test 5( 1 ), Test 6( 1 ), Test 7( 1 ), Test 8( 1 ) )
),
Chart( Position( 2 ) )
);
rpt = obj << report;
Code Explanation:
- Open table.
- Create control chart.
- Set Y variable.
- Define chart position.
- Apply spec limits.
- Enable multiple tests.
- Define second chart position.
- Generate report.
Example 44
Summary: Creates a control chart with multiple warning tests and generates a report object, while selecting specific rows and hiding them.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Variables( Y( :Month Number ) ),
Chart(
Position( 1 ),
Limits( Spec Limits( 1 ) ),
Warnings( Test 1( 1 ), Test 2( 1 ), Test 3( 1 ), Test 4( 1 ), Test 5( 1 ), Test 6( 1 ), Test 7( 1 ), Test 8( 1 ) )
),
Chart( Position( 2 ) )
);
rpt = obj << report;
dt << select rows( {120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130} ) << hide;
Code Explanation:
- Open data table.
- Create control chart.
- Set Y variable.
- Configure chart position.
- Define specification limits.
- Enable multiple warning tests.
- Add second chart.
- Generate report object.
- Select specific rows.
- Hide selected rows.
Example 45
Summary: Creates a control chart builder with multiple charts and warning tests to analyze data from a wafer production process.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Variables( Subgroup( :wafer ), Y( :PMS1 ), Phase( :SITE ) ),
Chart(
Position( 1 ),
Points( Statistic( "Average" ) ),
Limits( Sigma( "Range" ) ),
Warnings( Test 1( 1 ), Test 2( 1 ), Test 3( 1 ), Test 4( 1 ), Test 5( 1 ), Test 6( 1 ), Test 7( 1 ), Test 8( 1 ) )
),
Chart( Position( 2 ), Points( Statistic( "Range" ) ), Limits( Sigma( "Range" ) ) )
);
Code Explanation:
- Open data_table data
- Create control chart builder.
- Set subgroup variable.
- Set Y variable.
- Set phase variable.
- Add first chart.
- Set position of first chart.
- Plot average points.
- Set range limits.
- Enable warning tests.
Example 46
Summary: Creates a control chart builder with customized settings, including pin annotations for specific data points.
Code:
dt1 = Open("data_table.jmp");
ccb1 = dt1 << Control Chart Builder(
Size( 528, 464 ),
Show Control Panel( 0 ),
Variables( Subgroup( :Hour ), Y( :Thickness ), Phase( :Cavity ) ),
SendToReport(
Dispatch( {}, "Control Chart Builder", FrameBox( 2 ),
{Add Pin Annotation(
Seg( Marker Seg( 1 ) ),
Index( 19 ),
Index Row( 380 ),
UniqueID( -868777941 ),
FoundPt( {491, 120} ),
Origin( {18.8846153846154, 15.5236026294407} ),
RightOfCenter( 0 ),
Tag Line( 1 )
), Add Pin Annotation(
Seg( Marker Seg( 2 ) ),
Index( 6 ),
Index Row( 125 ),
UniqueID( -868810722 ),
FoundPt( {537, 290} ),
Origin( {25.9615384615385, 6.28201825815275} ),
RightOfCenter( 0 ),
Tag Line( 1 )
)}
),
Dispatch( {}, "Control Chart Builder", FrameBox( 3 ),
Add Pin Annotation(
Seg( Marker Seg( 3 ) ),
Index( 8 ),
Index Row( 170 ),
UniqueID( -869007328 ),
FoundPt( {679, 410} ),
Origin( {47.8076923076923, 3.92906830441131} ),
RightOfCenter( 0 ),
Tag Line( 1 )
)
)
)
);
Code Explanation:
- Open data table.
- Create control chart builder.
- Set chart size.
- Hide control panel.
- Define variables for subgroup, Y, and phase.
- Send report to add pin annotation.
- Add first pin annotation to frame box 2.
- Add second pin annotation to frame box 2.
- Add third pin annotation to frame box 3.
Example 47
Summary: Creates a control chart builder with specific variables and pin annotations for data analysis.
Code:
dt2 = Open("data_table.jmp");
ccb2 = dt2 << Control Chart Builder(
Size( 534, 464 ),
Show Control Panel( 0 ),
Variables( Subgroup( :Alcohol Consumption ), Subgroup( :Relapsed, Position( 1 ) ), Y( :Count ) ),
SendToReport(
Dispatch( {}, "Control Chart Builder", FrameBox,
{Add Pin Annotation(
Seg( Marker Seg( 1 ) ),
Index( 2 ),
Index Row( 3 ),
UniqueID( -829349862 ),
FoundPt( {688, 154} ),
Origin( {1.98461538461538, 100.162365732485} ),
RightOfCenter( 0 ),
Tag Line( 1 )
), Add Pin Annotation(
Seg( Marker Seg( 1 ) ),
Index( 0 ),
Index Row( 1 ),
UniqueID( -829349864 ),
FoundPt( {430, 249} ),
Origin( {0, 10.960682425812} ),
Offset( {-7, 46} ),
RightOfCenter( 0 ),
Tag Line( 1 )
)}
),
Dispatch( {}, "Control Chart Builder", FrameBox( 2 ),
{Add Pin Annotation(
Seg( Marker Seg( 1 ) ),
Index( 1 ),
Index Row( 0 ),
UniqueID( -830069223 ),
FoundPt( {558, 463} ),
Origin( {0.984615384615385, 8.25874440681437} ),
Offset( {-165, -70} ),
RightOfCenter( 0 ),
Tag Line( 1 )
), Add Pin Annotation(
Seg( Marker Seg( 1 ) ),
Index( 3 ),
Index Row( 2 ),
UniqueID( -830069221 ),
FoundPt( {823, 428} ),
Origin( {3.02307692307692, 49.9473489930454} ),
Offset( {19, -30} ),
RightOfCenter( 0 ),
Tag Line( 1 )
)}
)
)
);
Code Explanation:
- Open data table.
- Create control chart builder.
- Set chart size.
- Hide control panel.
- Define variables for subgroup and Y.
- Send report to add pin annotations.
- Add first pin annotation to frame 1.
- Add second pin annotation to frame 1.
- Add third pin annotation to frame 2.
- Add fourth pin annotation to frame 2.
Example 48
Summary: Creates a control chart builder to analyze NPN1 data, with two charts for moving range on means and std dev, and sends the report to Process Sigma Report.
Code:
dt = Open("data_table.jmp");
Control Chart Builder(
Size( 534, 448 ),
Show Control Panel( 0 ),
Show Sigma Report( 1 ),
Variables( Subgroup( :wafer ), Y( :NPN1 ) ),
Chart(
Position( 1 ),
Points( Statistic( "Moving Range on Means" ) ),
Limits( Sigma( "Median Moving Range" ) ),
Warnings( Test Beyond Limits( 1 ) )
),
Chart(
Position( 2 ),
Points( Statistic( "Moving Range on Std Dev" ) ),
Limits( Sigma( "Median Moving Range" ) ),
Warnings( Test Beyond Limits( 1 ) )
),
SendToReport( Dispatch( {"NPN1 Limit Summaries"}, "Process Sigma Report", OutlineBox, {Close( 1 )} ) )
);
Code Explanation:
- Open data table.
- Create control chart builder.
- Set window size.
- Hide control panel.
- Show sigma report.
- Define subgroup variable.
- Define Y variable.
- Add first chart for moving range on means.
- Set limits using median moving range.
- Enable test beyond limits warning.
- Add second chart for moving range on std dev.
- Set limits using median moving range.
- Enable test beyond limits warning.
- Close process sigma report.
Example 49
Summary: Creates a control chart for delay data, filtered by reason and displaying up to 5 items.
Code:
Open("data_table.jmp");
Control Chart Builder(
Show Control Panel( 0 ),
Show Limit Summaries( 0 ),
Variables( Subgroup( :Day ), Y( :Delay ) ),
Local Data Filter(
Width( 160 ),
Add Filter( columns( :Reason ), Where( :Reason == {"Fog", "Late", "Mechanical"} ), Display( :Reason, N Items( 5 ) ) )
)
);
Code Explanation:
- Open data table.
- Launch Control Chart Builder.
- Hide control panel.
- Hide limit summaries.
- Set subgroup variable.
- Set Y variable.
- Add local data filter.
- Set filter width.
- Define filter criteria.
- Display filtered items.
Example 50
Summary: Creates a Control Chart Builder with two charts, configuring variables and chart settings to visualize delay and flight data.
Code:
Open("data_table.jmp");
Control Chart Builder(
Size( 764, 464 ),
Show Control Panel( 0 ),
Show Limit Summaries( 0 ),
Variables( Y( :Delay ), Phase( :Flight ) ),
Chart( Position( 1 ), Points( Show Points( 0 ) ), Limits( Show Center Line( 0 ), Show Lower Limit( 0 ), Show Upper Limit( 0 ) ) ),
Chart( Position( 2 ), Points( Show Connect Line( 0 ) ), Limits( Show Center Line( 0 ), Show Lower Limit( 0 ), Show Upper Limit( 0 ) ) )
);
Code Explanation:
- Open data table;
- Launch Control Chart Builder.
- Set window size.
- Hide control panel.
- Hide limit summaries.
- Define variables: Delay, Flight.
- Configure first chart position.
- Hide points in first chart.
- Hide limits in first chart.
- Configure second chart position.
- Hide connect lines in second chart.
- Hide limits in second chart.
Example 51
Summary: Creates a control chart for height data, filtered by sex, using Control Chart Builder in JMP.
Code:
Open("data_table.jmp");
Control Chart Builder(
Show Limit Summaries( 0 ),
Variables( Y( :height ), Label( :sex ) ),
Show Control Panel( 0 ),
Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "F" ) ) ),
SendToReport( Dispatch( {}, "height Limit Summaries", OutlineBox, {Close( 1 )} ) )
);
Code Explanation:
- Open data table;
- Launch Control Chart Builder.
- Disable limit summaries.
- Set Y variable to height.
- Label by sex.
- Hide control panel.
- Add local data filter.
- Filter for female sex.
- Close height limit summaries.
Example 52
Summary: Creates a control chart with three charts: average, range, and standard deviation, using the Control Chart Builder platform in JMP.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Size( 534, 464 ),
Show Control Panel( 0 ),
Variables( Subgroup( :lot_id ), Subgroup( :wafer, Position( 1 ) ), Y( :INM1 ) ),
Chart( Position( 1 ), Points( Statistic( "Average" ) ), Limits( Sigma( "Moving Range" ) ) ),
Chart( Position( 2 ), Points( Statistic( "Range" ) ), Limits( Sigma( "Moving Range" ) ) ),
Chart( Position( 3 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Standard Deviation" ) ) )
);
Code Explanation:
- Open data table;
- Create control chart object.
- Set window size.
- Hide control panel.
- Define subgroup variables.
- Add average chart.
- Set average limits.
- Add range chart.
- Set range limits.
- Add standard deviation chart.
- Set standard deviation limits.
Example 53
Summary: Creates a control chart to visualize and analyze delay times based on reason, utilizing Control Chart Builder in JMP.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder( Variables( "Y"(:Delay), "Phase"(:Reason) ), );
Code Explanation:
- Open data table.
- Create control chart object.
- Set Y variable to Delay.
- Set Phase variable to Reason.
- Build control chart.
Example 54
Summary: Creates a control chart builder object with specific variables and selects a single row for analysis.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder( Variables( "Y"(:Delay), "Phase"(:Reason) ), );
dt << select rows( 187 );
Code Explanation:
- Open data table;
- Create control chart builder object.
- Set Y variable to "Delay".
- Set Phase variable to "Reason".
- Select row 187.
Example 55
Summary: Creates a control chart builder object with multiple charts and reference lines, utilizing variables from an open data table.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Variables( Y( :RstPulse, :Oxy, :Age ) ),
Chart( Position( 1 ) ),
Chart( Position( 2 ) ),
SendToReport(
Dispatch( {}, "", ScaleBox, {Add Ref Line( 21, Solid, "Black", "", 2 )} ),
Dispatch( {}, "", ScaleBox( 5 ), {Add Ref Line( 21, Solid, "Black", "", 2 )} ),
Dispatch( {}, "", ScaleBox( 9 ), {Add Ref Line( 21, Solid, "Black", "", 2 )} )
)
);
Code Explanation:
- Open data table;
- Create control chart builder object.
- Set variables for analysis.
- Add first chart.
- Add second chart.
- Send report dispatch.
- Add reference line to first scale box.
- Add reference line to fifth scale box.
- Add reference line to ninth scale box.
Example 56
Summary: Creates a Control Chart Builder with multiple charts and reference lines, utilizing variables RstPulse, Oxy, and Age.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Variables( Y( :RstPulse, :Oxy, :Age ) ),
Chart( Position( 1 ) ),
Chart( Position( 2 ) ),
SendToReport(
Dispatch( {}, "", ScaleBox, {Add Ref Line( 21, Solid, "Black", "", 2 )} ),
Dispatch( {}, "", ScaleBox( 5 ), {Add Ref Line( 21, Solid, "Black", "", 2 )} ),
Dispatch( {}, "", ScaleBox( 9 ), {Add Ref Line( 21, Solid, "Black", "", 2 )} )
)
);
dt2 = Open("data_table.jmp");
Code Explanation:
- Open data table;
- Create Control Chart Builder.
- Set variables for RstPulse, Oxy, Age.
- Add first chart.
- Add second chart.
- Add reference line at 21 on first scale.
- Add reference line at 21 on fifth scale.
- Add reference line at 21 on ninth scale.
- Open data table;
Example 57
Summary: Creates a control chart builder object with specific settings, including excluded region display and sample size selection.
Code:
dt = Open("data_table.jmp");
dt << select rows( {1, 2, 3, 4, 5} ) << exclude;
obj = dt << Control Chart Builder(
Show Excluded Region( 1 ),
Variables( Y( :height ) ),
Set Sample Size( 5 ),
Chart( Points( Statistic( "Average" ) ), Limits( Sigma( "Range" ) ) )
);
Code Explanation:
- Open data table.
- Select specific rows.
- Exclude selected rows.
- Create control chart builder object.
- Show excluded region.
- Set Y variable.
- Set sample size.
- Add points to chart.
- Set statistic for points.
- Add limits to chart.
Example 58
Summary: Creates a control chart builder object with specific variables and filters to analyze data from a subset of rows in a JMP data table.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Variables( Subgroup( :State ), Y( :NO ) ),
Show Excluded Region( 0 ),
Local Data Filter( Add Filter( columns( :X ), Where( :X >= 0.1075 & :X <= 0.2 ) ) ),
Where( :Region == "MW" )
);
Code Explanation:
- Open data table;
- Create control chart builder object.
- Set subgroup variable to "State".
- Set Y variable to "NO".
- Disable excluded region display.
- Add local data filter.
- Filter column "X" values between 0.1075 and 0.2.
- Apply filter condition.
- Filter rows where "Region" equals "MW".
Example 59
Summary: Creates a control chart builder object with specific variables and filters to analyze data from the 'MW' region.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Variables( Subgroup( :State ), Y( :NO ) ),
Show Excluded Region( 0 ),
Local Data Filter( Add Filter( columns( :X ), Where( :X >= 0.1075 & :X <= 0.2 ) ) ),
Where( :Region == "MW" )
);
dt = Open("data_table.jmp");
Code Explanation:
- Open data table.
- Create control chart builder object.
- Set subgroup variable to State.
- Set response variable to NO.
- Hide excluded region.
- Add local data filter for X.
- Filter where X between 0.1075 and 0.2.
- Apply condition where Region equals MW.
- Open data table.
Example 60
Summary: Creates a control chart with customized graph spacing color, utilizing Control Chart Builder to visualize subgroup data.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder( Variables( Y( :Weight ), Subgroup( :Sample ) ) );
obj << Graph Spacing Color( "Red" );
Code Explanation:
- Open data table.
- Create control chart object.
- Set graph spacing color.
Example 61
Summary: Creates a control chart with specified variables and customizes graph spacing settings.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder( Variables( Y( :Weight ), Subgroup( :Sample ) ) );
obj << Graph Spacing Color( "Red" );
obj << Graph Spacing Transparency( 0.3 );
Code Explanation:
- Open data table;
- Create control chart object.
- Set Y variable to Weight.
- Set Subgroup variable to Sample.
- Change graph spacing color to red.
- Set graph spacing transparency to 0.3.
Example 62
Summary: Creates a control chart builder to visualize and analyze toxicity data, featuring multiple charts for average points, moving range on means, and range with specification limits.
Code:
Open("data_table.jmp");
Control Chart Builder(
Size( 534, 450 ),
Variables( Subgroup( :Formulation ), Y( :Toxicity ) ),
Chart(
Position( 1 ),
Points( Statistic( "Average" ) ),
Limits( Sigma( "Moving Range" ) ),
Add Spec Limits( {LSL( 4 ), USL( 6.5 ), Target( 5 )} )
),
Chart( Position( 2 ), Points( Statistic( "Moving Range on Means" ) ), Limits( Sigma( "Moving Range" ) ) ),
Chart( Position( 3 ), Points( Statistic( "Range" ) ), Limits( Sigma( "Range" ) ) ),
Show Control Panel( 0 ),
SendToReport(
Dispatch( {}, "Toxicity", ScaleBox,
{Add Ref Line( 4, "Solid", "Blue", "LSL", 1 ), Add Ref Line( 6.5, "Solid", "Blue", "USL", 1 ),
Add Ref Line( 5, "Solid", "Blue", "Target", 1 )}
),
Dispatch( {}, "Control Chart Builder", FrameBox,
Add Pin Annotation(
Seg( Marker Seg( 1 ) ),
Index( 2 ),
Index Row( 100 ),
UniqueID( 2 ),
FoundPt( {476, 121} ),
Origin( {2.00354609929078, 6.10148542583318} ),
RightOfCenter( 1 ),
Tag Line( 1 )
)
),
Dispatch( {}, "Control Chart Builder", FrameBox( 2 ),
Add Pin Annotation(
Seg( Marker Seg( 1 ) ),
Index( 1 ),
Index Row( 50 ),
UniqueID( 1 ),
FoundPt( {335, 307} ),
Origin( {1.00354609929078, 0.256186587181004} ),
Offset( {5, -64} ),
RightOfCenter( 0 ),
Tag Line( 1 )
)
),
Dispatch( {}, "Control Chart Builder", FrameBox( 3 ),
Add Pin Annotation(
Seg( Marker Seg( 1 ) ),
Index( 0 ),
Index Row( 0 ),
UniqueID( 0 ),
FoundPt( {194, 427} ),
Origin( {0.00354609929078009, 6.20824088265475} ),
Offset( {-6, -65} ),
RightOfCenter( 0 ),
Tag Line( 1 )
)
),
Dispatch( {}, "Toxicity Limit Summaries", OutlineBox, {Close( 1 )} ),
Dispatch( {"Toxicity Limit Summaries"}, "Process Capability Analysis", OutlineBox, {Close( 1 )} )
)
);
Code Explanation:
- Open data table;
- Create control chart builder.
- Set window size.
- Define subgroup and response variables.
- Add first chart for average points.
- Set limits using moving range.
- Add specification limits.
- Add second chart for moving range on means.
- Add third chart for range.
- Hide control panel.
Example 63
Summary: Creates a control chart builder object to visualize and analyze data, configuring points and limits for proportion, and enabling multiple warning tests and rules.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Size( 528, 464 ),
Show Control Panel( 0 ),
Class( Shewhart Attribute ),
Variables( Y( :height, :weight ), Phase( :sex ) ),
Set Subgroup Size( 5 ),
Chart(
Points( Statistic( "Proportion" ) ),
Limits( Sigma( "Poisson" ) ),
Warnings(
Test 1( 1 ),
Test 2( 1 ),
Test 3( 1 ),
Test 4( 1 ),
Test 5( 1 ),
Test 6( 1 ),
Test 7( 1 ),
Test 8( 1 ),
Rule 1 2S( 1 ),
Rule 1 3S( 1 ),
Rule 2 2S( 1 ),
Rule R 4S( 1 ),
Rule 4 1S( 1 ),
Rule 10 X( 1 )
)
),
SendToReport(
Dispatch( {}, "Control Chart Builder", FrameBox,
{DispatchSeg( Text Seg( 1 ), {Line Color( "None" ), Fill Color( "None" )} ), DispatchSeg(
Text Seg( 2 ),
{Line Color( "None" ), Fill Color( "None" )}
)}
),
Dispatch( {}, "Control Chart Builder", FrameBox( 3 ),
{DispatchSeg( Text Seg( 1 ), {Line Color( "None" ), Fill Color( "None" )} ), DispatchSeg(
Text Seg( 2 ),
{Line Color( "None" ), Fill Color( "None" )}
)}
),
Dispatch( {}, "Control Chart Builder", FrameBox( 4 ),
{Add Pin Annotation(
Seg( Marker Seg( 1 ) ),
Index( 3 ),
Index Row( 34 ),
UniqueID( -1683937277 ),
FoundPt( {524, 736} ),
Origin( {4.04378612716763, 114.29375} ),
RightOfCenter( 0 ),
Tag Line( 1 )
), Add Pin Annotation(
Seg( Marker Seg( 1 ) ),
Index( 1 ),
Index Row( 8 ),
UniqueID( -1683937279 ),
FoundPt( {409, 796} ),
Origin( {1.99971098265896, 91.04375} ),
RightOfCenter( 0 ),
Tag Line( 1 )
), Add Pin Annotation(
Seg( Marker Seg( 2 ) ),
Index( 4 ),
Index Row( 38 ),
UniqueID( -1683952188 ),
FoundPt( {802, 537} ),
Origin( {8.98511560693642, 152.85} ),
Offset( {-385, 81} ),
RightOfCenter( 1 ),
Tag Line( 1 )
)}
)
)
);
Code Explanation:
- Open data table.
- Create control chart builder object.
- Set chart size to 528x464.
- Hide control panel.
- Use Shewhart attribute class.
- Define variables: height, weight, sex.
- Set subgroup size to 5.
- Configure points and limits for proportion.
- Enable multiple warning tests and rules.
- Customize report appearance and add annotations.
Example 64
Summary: Creates a control chart builder to visualize and analyze data from a specific subgroup, utilizing box plots and local data filtering.
Code:
Open("data_table.jmp");
Control Chart Builder(
Size( 522, 448 ),
Show Control Panel( 0 ),
Show Limit Summaries( 0 ),
Variables( Subgroup( :Hour ), Y( :Thickness ) ),
Chart( Position( 1 ), Points( Box Plots( 1 ) ) ),
Local Data Filter( Width( 160 ), Add Filter( columns( :Cavity ), Where( :Cavity == "4" ), Display( :Cavity, N Items( 3 ) ) ) )
);
Code Explanation:
- Open data table.
- Create control chart builder.
- Set window size.
- Hide control panel.
- Hide limit summaries.
- Define subgroup and Y variables.
- Add box plot points.
- Add local data filter.
- Set filter width.
- Filter by cavity "4".
Example 65
Summary: Creates a control chart builder with specified size, hidden control panel and limit summaries, and defined subgroup and Y variables.
Code:
Open("data_table.jmp");
Control Chart Builder( Size( 528, 448 ), Show Control Panel( 0 ), Show Limit Summaries( 0 ), Variables( Subgroup( :Run ), Y( :Length ) ) );
Code Explanation:
- Open data table;
- Create control chart builder.
- Set chart size.
- Hide control panel.
- Hide limit summaries.
- Define subgroup variable.
- Define Y variable.
Example 66
Summary: Creates a control chart for height, utilizing Control Chart Builder with sex as subgroup and age as phase variable.
Code:
Open("data_table.jmp");
Control Chart Builder( Size( 528, 448 ), Show Control Panel( 0 ), Show Limit Summaries( 0 ), Variables( Subgroup( :Run ), Y( :Length ) ) );
dt = Open("data_table.jmp");
Column( dt, "age" ) << set modeling type( "continuous" );
For( i = 38, i <= 40, i++,
Column( dt, "age" )[i] = .
);
obj = dt << Control Chart Builder(
Size( 528, 458 ),
Show Control Panel( 0 ),
Show Limit Summaries( 0 ),
Variables( Subgroup( :sex ), Y( :height ), Phase( :age ) )
);
Code Explanation:
- Open data_table data
- Create control chart for Length.
- Open data_table data
- Set age column as continuous.
- Loop through rows 38-40.
- Set age values to missing.
- Create control chart for height.
- Use sex as subgroup.
- Use age as phase variable.
Example 67
Summary: Creates a control chart builder with specific variables and settings, while also modifying data in an external data table.
Code:
Open("data_table.jmp");
Control Chart Builder( Size( 528, 448 ), Show Control Panel( 0 ), Show Limit Summaries( 0 ), Variables( Subgroup( :Run ), Y( :Length ) ) );
dt = Open("data_table.jmp");
Column( dt, "age" ) << set modeling type( "continuous" );
For( i = 38, i <= 40, i++,
Column( dt, "age" )[i] = .
);
Code Explanation:
- Open data table;
- Create control chart builder.
- Hide control panel.
- Hide limit summaries.
- Set variables for chart.
- Open another data file.
- Set age column type.
- Loop through specific rows.
- Replace age values with missing.
Example 68
Summary: Creates a Control Chart Builder object with specific settings, including chart size and variable selection.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder( Size( 528, 458 ), Show Control Panel( 0 ), Show Limit Summaries( 0 ), Variables( Y( :height ) ) );
dt << select all rows << exclude;
Code Explanation:
- Open data table;
- Create Control Chart Builder object.
- Set chart size to 528x458.
- Hide control panel.
- Hide limit summaries.
- Add height variable to Y-axis.
- Select all rows in dataset.
- Exclude selected rows.
Example 69
Summary: Creates a control chart builder object with specific settings and variables, including height as the Y-axis variable.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder( Size( 528, 458 ), Show Control Panel( 0 ), Show Limit Summaries( 0 ), Variables( Y( :height ) ) );
dt << select all rows << exclude;
dt << clear select;
Code Explanation:
- Open data table.
- Create control chart builder object.
- Set chart size and options.
- Add height variable to Y axis.
- Select all rows in table.
- Exclude selected rows.
- Clear row selection.
Example 70
Summary: Creates a control chart builder object with specified variables, hiding the control panel and sending it to a report.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = Control Chart Builder( show control panel( 0 ), Variables( Y( :Weight ), Subgroup( :Sample ) ) );
Code Explanation:
- Set default names.
- Open data table.
- Create control chart builder object.
- Hide control panel.
- Specify variables for chart.
Example 71
Summary: Creates a Control Chart Builder with two charts, one for averages and one for ranges, using the Day variable as subgroup and Delay as Y variable.
Code:
dt under test = Open("data_table.jmp");
obj = Control Chart Builder(
Show Control Panel( 0 ),
Variables( "Subgroup"(:Day), "Y"(:Delay) ),
Chart( Position( 1 ), Points( Statistic( "Average" ) ), Limits( Sigma( "Range" ) ), Connecting Line( 1 ) ),
Chart( Position( 2 ), Points( Statistic( "Range" ) ), Limits( Sigma( "Range" ) ), Connecting Line( 1 ) )
);
Code Explanation:
- Open data_table data
- Create Control Chart Builder.
- Hide control panel.
- Set subgroup variable to Day.
- Set Y variable to Delay.
- Add first chart for averages.
- Use average statistic.
- Set limits based on range sigma.
- Enable connecting lines.
- Add second chart for ranges.
Example 72
Summary: Creates a control chart builder object and adds a transformed variable to the Y role, utilizing Graph Builder Box.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder();
ccbb = Report( obj )[Graph Builder Box( 1 )];
ccbb << Add Variable( {Transform Column( "First[sex]", Character, Formula( Word( 1, :sex ) ) ), Role( "Y" )} );
Code Explanation:
- Open data table.
- Create control chart builder object.
- Access graph builder box.
- Add transformed variable to Y role.
Example 73
Summary: Creates a control chart builder object with specific variables and filters, generating a report for analysis.
Code:
dt = Open("data_table.jmp");
obj = Control Chart Builder(
Show Control Panel( 0 ),
Variables( Y( :height ), Phase( :age ) ),
Chart( Position( 1 ) ),
Chart( Position( 2 ) ),
Local Data Filter(
Location( {412, 107} ),
Add Filter( columns( :height ), Where( :height >= 55 & :height <= 66 ) ),
Mode( Select( 0 ), Show( 1 ), Include( 1 ) )
),
);
obj << Automatic Recalc( 0 );
dt << Select Where( :sex == "F" );
dt << Exclude();
rpt = Report( obj );
Code Explanation:
- Open data table.
- Create control chart builder object.
- Hide control panel.
- Set Y variable to height.
- Set phase variable to age.
- Add first chart.
- Add second chart.
- Enable local data filter.
- Set filter location.
- Add height filter criteria.
- Disable automatic recalculation.
- Select female rows.
- Exclude selected rows.
- Generate report object.
Example 74
Summary: Creates and customizes a Control Chart Builder to analyze height data, filtering by sex and age range, and generates reports.
Code:
dt = Open("data_table.jmp");
obj = Control Chart Builder(
Show Control Panel( 0 ),
Variables( Y( :height ), Phase( :age ) ),
Chart( Position( 1 ) ),
Chart( Position( 2 ) ),
Local Data Filter(
Location( {412, 107} ),
Add Filter( columns( :height ), Where( :height >= 55 & :height <= 66 ) ),
Mode( Select( 0 ), Show( 1 ), Include( 1 ) )
),
);
dt << Select Where( :sex == "F" );
dt << Exclude();
rpt = Report( obj );
Close( dt, NoSave );
dt = Open("data_table.jmp");
obj = Control Chart Builder(
Show Control Panel( 0 ),
Variables( Y( :height ), Phase( :age ) ),
Chart( Position( 1 ) ),
Chart( Position( 2 ) ),
Local Data Filter(
Location( {412, 107} ),
Add Filter( columns( :height ), Where( :height >= 55 & :height <= 66 ) ),
Mode( Select( 0 ), Show( 1 ), Include( 1 ) )
),
);
obj << Automatic Recalc( 0 );
dt << Select Where( :sex == "F" );
dt << Exclude();
rpt = Report( obj );
Code Explanation:
- Open data table;
- Create Control Chart Builder.
- Hide control panel.
- Set Y variable to height.
- Set phase variable to age.
- Add first chart.
- Add second chart.
- Add local data filter.
- Set filter location.
- Add height filter criteria.
- Set filter mode.
- Select females.
- Exclude selected rows.
- Generate report.
- Close file without saving.
- Reopen "data_table.jmp".
- Create Control Chart Builder again.
- Hide control panel.
- Set Y variable to height.
- Set phase variable to age.
- Add first chart.
- Add second chart.
- Add local data filter.
- Set filter location.
- Add height filter criteria.
- Set filter mode.
- Disable automatic recalculation.
- Select females.
- Exclude selected rows.
- Generate report.
Example 75
Summary: Creates and analyzes control charts for weight limits, filtering data based on Pin values and extracting summary statistics.
Code:
dt = Open("data_table.jmp");
ccb = dt << Control Chart Builder( Variables( Y( :Weight ), Subgroup( :Sample ) ) );
dt << select where( :Pin > 10 );
dt << Hide and Exclude( 1 );
results1 = Report( ccb )["Weight Limit Summaries"][Table Box( 1 )] << Get as Matrix;
dt << Clear Row STates;
dt << Select Where( :pin < 10 );
dt << Hide and Exclude( 1 );
results2 = Report( ccb )["Weight Limit Summaries"][Table Box( 1 )] << Get as Matrix;
Code Explanation:
- Open data_table data
- Create control chart builder.
- Select rows where Pin > 10.
- Hide and exclude selected rows.
- Extract weight limit summaries matrix.
- Clear row states.
- Select rows where Pin < 10.
- Hide and exclude selected rows.
- Extract weight limit summaries matrix again.
Example 76
Summary: Creates and customizes a control chart builder object in JMP, generating reports with multiple charts and adjusting frame box sizes.
Code:
Open("data_table.jmp");
obj = Control Chart Builder(
Variables( "Subgroup"(:DAY), "Y"(:DIAMETER) ),
Chart( Position( 1 ), Points( Statistic( "Average" ) ), Limits( Sigma( "Range" ) ), Connecting Line( 1 ) ),
Chart( Position( 2 ), Points( Statistic( "Range" ) ), Limits( Sigma( "Range" ) ), Connecting Line( 1 ) )
);
rpt = obj << report;
size_loc = rpt[FrameBox( 1 )] << get size;
size_dis = rpt[FrameBox( 2 )] << get size;
rpt[FrameBox( 1 )] << FrameSize( 514, 300 );
size_loc = rpt[FrameBox( 1 )] << get size;
size_dis = rpt[FrameBox( 2 )] << get size;
rpt[FrameBox( 2 )] << FrameSize( 514, 50 );
size_loc = rpt[FrameBox( 1 )] << get size;
size_dis = rpt[FrameBox( 2 )] << get size;
obj << close window;
Code Explanation:
- Open data table;
- Create control chart builder object.
- Define variables for chart.
- Add first chart with average points and range limits.
- Add second chart with range points and range limits.
- Generate report from control chart.
- Get size of first frame box.
- Get size of second frame box.
- Set size of first frame box.
- Close control chart window.
Example 77
Summary: Creates and configures a control chart with two frames, retrieving report data and adjusting frame sizes.
Code:
dt = Open("data_table.jmp");
obj = Control Chart Builder(
Variables( "Subgroup"(:DAY), "Y"(:DIAMETER) ),
Chart( Position( 1 ), Points( Statistic( "Average" ) ), Limits( Sigma( "Range" ) ), Connecting Line( 1 ) ),
Chart( Position( 2 ), Points( Statistic( "Range" ) ), Limits( Sigma( "Range" ) ), Connecting Line( 1 ) )
);
rpt = obj << report;
size_loc = rpt[FrameBox( 1 )] << get size;
size_dis = rpt[FrameBox( 2 )] << get size;
rpt[FrameBox( 1 )] << FrameSize( 514, 300 );
size_loc = rpt[FrameBox( 1 )] << get size;
size_dis = rpt[FrameBox( 2 )] << get size;
rpt[FrameBox( 2 )] << FrameSize( 514, 50 );
size_loc = rpt[FrameBox( 1 )] << get size;
size_dis = rpt[FrameBox( 2 )] << get size;
obj << close window;
Code Explanation:
- Open data table.
- Create control chart object.
- Define chart variables.
- Configure first chart settings.
- Configure second chart settings.
- Retrieve chart report.
- Get initial frame sizes.
- Resize first frame.
- Update frame sizes again.
- Resize second frame.
Example 78
Summary: Creates a Shewhart Attribute control chart with Poisson limits for sigma calculation, using the Date variable as the Y-axis and enabling Event Chooser.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Class( Shewhart Attribute ),
use Event Chooser( 1 ),
Variables( Y( :Date ) ),
Chart( Points( Statistic( "Count" ) ), Limits( Sigma( "Poisson" ) ) )
);
Code Explanation:
- Open data table;
- Create control chart object.
- Set chart type to Shewhart Attribute.
- Enable Event Chooser.
- Set Y variable to Date.
- Plot points using Count statistic.
- Use Poisson limits for sigma calculation.
Example 79
Summary: Creates and analyzes control charts for height and weight data, utilizing Control Chart Builder to visualize subgroup variations and standard deviations.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Variables( Subgroup( :sex ), Y( :height, :weight ) ),
Chart(
Position( 1 ),
Points( Individual Points( 1 ) ),
Limits( Sigma( "Standard Deviation" ) ),
Warnings( Test 1( 1 ), Test 2( 1 ), Test 3( 1 ), Test 4( 1 ), Test 5( 1 ), Test 6( 1 ), Test 7( 1 ), Test 8( 1 ) )
),
Chart( Position( 2 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Standard Deviation" ) ) )
);
obj << redo analysis;
obj = dt << Control Chart Builder( Variables( Y( :height, :weight ) ), Chart( Position( 1 ), Limits( Zones( 1 ) ) ) );
obj << redo analysis;
Code Explanation:
- Open data table;
- Create Control Chart Builder object.
- Set subgroup variable to sex.
- Add height and weight as Y variables.
- Configure first chart: individual points.
- Set limits using standard deviation.
- Enable all warning tests.
- Configure second chart: standard deviation statistic.
- Set limits using standard deviation.
- Redo analysis on first chart.
- Create new Control Chart Builder object.
- Add height and weight as Y variables.
- Configure single chart: zones limits.
- Redo analysis on second chart.
Example 80
Summary: Creates and saves control charts for delay and flight variables, utilizing Control Chart Builder to summarize data.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder( Variables( Y( :Delay, :Flight ) ) );
dtSum = obj << Save Summaries;
Close( dt, no save );
Close( dtSum, no save );
dtSum2 = Data Table("data_table");
Code Explanation:
- Open data table.
- Create control chart object.
- Save summaries from chart.
- Close original data table.
- Close summary data table.
- Open saved summary table.
Example 81
Summary: Creates a control chart to analyze delay and flight variables, utilizing Control Chart Builder to generate summaries.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder( Variables( Y( :Delay, :Flight ) ) );
dtSum = obj << Save Summaries;
Code Explanation:
- Open data table.
- Create control chart object.
- Add variables to chart.
- Save summaries from chart.
Example 82
Summary: Creates a control chart report for :OZONE data, using Control Chart Builder to visualize subgroup and Y variable relationships.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder( Variables( Subgroup( :Y ), Y( :OZONE ) ) );
rpt = obj << report;
Code Explanation:
- Open data table;
- Create control chart object.
- Set subgroup variable to :Y.
- Set Y variable to :OZONE.
- Generate control chart report.
- Assign report to rpt variable.
Example 83
Summary: Creates a Shewhart Attribute control chart using JMP's Control Chart Builder, with points plotted based on count statistics and limits set using Poisson sigma.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Class( Shewhart Attribute ),
Variables( Subgroup( :Bolt ), Y( :Flaws ) ),
Chart( Points( Statistic( "Count" ) ), Limits( Sigma( "Poisson" ) ) )
);
dt << delete rows( {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25} );
Code Explanation:
- Open data table.
- Create control chart builder object.
- Set chart type to Shewhart Attribute.
- Define subgroup variable.
- Define response variable.
- Plot points using count statistic.
- Set limits using Poisson sigma.
- Delete specified rows from data table.
Example 84
Summary: Creates a Control Chart Builder with Floss Delimited as Y, Phase, and Subgroup variables.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder();
ccbb = Report( obj )[Graph Builder Box( 1 )];
ccbb << Add Variable( {Column( dt, "Floss Delimited" ), Role( "Y" )} );
ccbb << Add Variable( {Column( dt, "Floss Delimited" ), Role( "Phase" )} );
ccbb << Add Variable( {Column( dt, "Floss Delimited" ), Role( "Subgroup" )} );
Code Explanation:
- Open data table;
- Create Control Chart Builder.
- Access Graph Builder Box.
- Add Floss Delimited as Y variable.
- Add Floss Delimited as Phase variable.
- Add Floss Delimited as Subgroup variable.
Example 85
Summary: Creates a Shewhart Attribute control chart to monitor the proportion of status changes, utilizing binomial limits and multiple tests and rules.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Show Alarm Report( 1 ),
Class( Shewhart Attribute ),
Variables( Subgroup( :Sample ), Y( :Status ), Phase( :Phase ) ),
Chart(
Points( Statistic( "Proportion" ) ),
Limits( Sigma( "Binomial" ) ),
Warnings(
Test 1( 1 ),
Test 2( 1 ),
Test 3( 1 ),
Test 4( 1 ),
Test 5( 1 ),
Test 6( 1 ),
Test 7( 1 ),
Test 8( 1 ),
Rule 1 2S( 1 ),
Rule 1 3S( 1 ),
Rule 2 2S( 1 ),
Rule R 4S( 1 ),
Rule 4 1S( 1 ),
Rule 10 X( 1 ),
Test Beyond Limits( 1 )
)
)
);
obj << Test Excluded subgroups( 0 );
obj << Save Script to Script window;
actScript = Window( "Script Window" ) << get text;
Window( "Script Window" ) << close window;
Code Explanation:
- Open data table.
- Create control chart builder object.
- Enable alarm report.
- Set chart type to Shewhart Attribute.
- Define subgroup, Y, and phase variables.
- Plot proportion points.
- Set binomial limits.
- Enable multiple tests and rules.
- Disable excluded subgroup testing.
- Save script to script window.
Example 86
Summary: Creates a control chart to monitor the proportion of received applications, utilizing Control Chart Builder and report generation.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder( Variables( Y( :Receive Application ) ) );
rpt = obj << report;
Code Explanation:
- Open table.
- Create control chart.
- Set variable.
- Generate report.
Example 87
Summary: Creates a control chart for NPN1 data, positioning it in the first column and formatting the scale box to display percentages.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Variables( Y( :NPN1 ) ),
Chart( Position( 1 ) ),
SendToReport(
Dispatch( {"NPN1 Limit Summaries", "Process Capability Analysis", "Histogram"}, "1", ScaleBox, {Format( "Percent", 12, 0 )} )
)
);
rpt = obj << report;
Code Explanation:
- Open table.
- Create control chart.
- Set Y variable.
- Position chart.
- Format scale box.
- Generate report.
Example 88
Summary: Creates a Shewhart Attribute control chart with proportion statistic and Poisson distribution limits, generating a report from the analysis.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Class( Shewhart Attribute ),
Variables( Y( :species ) ),
Chart( Points( Statistic( "Proportion" ) ), Limits( Sigma( "Poisson" ) ) )
);
rpt = obj << report;
Code Explanation:
- Open data table.
- Create control chart object.
- Set chart type to Shewhart Attribute.
- Specify variable for analysis.
- Define chart with proportion statistic.
- Set limits using Poisson distribution.
- Generate report from chart.
Example 89
Summary: Creates a control chart for analyzing the proportion of NPN1 in a dataset, specifying variables and position, and generating a report.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder( Variables( Y( :NPN1 ) ), Chart( Position( 1 ) ) );
rpt = obj << report;
Code Explanation:
- Open table.
- Create control chart.
- Set variable.
- Specify position.
- Generate report.
Example 90
Summary: Creates a control chart builder object to visualize and analyze data from a specified data table, with subgrouping by State and grouping charts by Region.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Sort by Subgroup( 1 ),
Variables( Subgroup( :State ), Y( :POP ) ),
Chart( Position( 1 ), Limits( Sigma( "Standard Deviation" ), Shade Zones( 1 ) ) ),
Chart( Position( 2 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Standard Deviation" ) ) ),
By( :Region )
);
rpt = obj << report;
Code Explanation:
- Open data table.
- Create control chart builder object.
- Sort by subgroup column.
- Define subgroup and Y variables.
- Add first chart with sigma limits.
- Add second chart with standard deviation points.
- Apply sigma limits to second chart.
- Group charts by region.
- Generate report from object.
- Assign report to variable.
Example 91
Summary: Creates a control chart report from a data table, utilizing Control Chart Builder to visualize and analyze subgroup data.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder();
rpt = obj << report;
Code Explanation:
- Open data table;
- Create control chart builder object.
- Generate control chart report.
Example 92
Summary: Creates a control chart for OZONE and CO variables in a data table, with subgroup size set to 5 and spec limits applied from CitySpecLimits.jmp.
Code:
dt = Open("data_table.jmp");
dtLimits = Open("data_table.jmp");
obj = dt << Control Chart Builder( Variables( Y( :OZONE, :CO ) ), Set Subgroup Size( 5 ) );
obj << Get Spec Limits( dtLimits );
obj << save script to script window;
actScript = Window( "Script Window" ) << get text;
Window( "Script Window" ) << close Window;
Code Explanation:
- Open data table;
- Open data table;
- Create control chart for OZONE and CO.
- Set subgroup size to 5.
- Apply spec limits from "CitySpecLimits.jmp".
- Save script to script window.
- Retrieve script text from window.
- Close script window.
Example 93
Summary: Creates a control chart builder object with specified variables and generates a report, while also setting platform preferences.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder( Variables( "Subgroup"(:MACHINE), "Subgroup"(:DAY, Position( 1 )), "Y"(:DIAMETER) ) );
rpt = obj << report;
Close( dt, no save );
Preferences( Control Chart Builder( Shade Zones( 0 ) ) );
Code Explanation:
- Open data table;
- Create control chart builder object.
- Assign variables for subgroup and Y.
- Generate report from object.
- Close table without saving.
- Set platform preferences.
- Disable shade zones in control chart builder.
Example 94
Summary: Creates a control chart report for diameter measurements, using subgroup variables MACHINE and DAY, and Y variable DIAMETER.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder( Variables( "Subgroup"(:MACHINE), "Subgroup"(:DAY, Position( 1 )), "Y"(:DIAMETER) ) );
rpt = obj << report;
Code Explanation:
- Open data table;
- Create control chart builder object.
- Set subgroup variables: MACHINE, DAY.
- Set Y variable: DIAMETER.
- Generate control chart report.
Example 95
Summary: Creates a control chart for NPN1 variable, grouping by lot_id and wafer, using Control Chart Builder in JMP.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder( Variables( Subgroup( :lot_id ), Subgroup( :wafer ), Y( :NPN1 ) ) );
Code Explanation:
- Open data table;
- Create control chart object.
- Set subgroup variable lot_id.
- Set subgroup variable wafer.
- Set response variable NPN1.
Example 96
Summary: Creates a control chart for short-run data, specifying Total Kernels as the Y variable, Number Popped as the Phase, and Brand as the Part.
Code:
dt = Open("data_table.jmp");
obj = dt << Control Chart Builder(
Class( Short Run ),
Variables( Y( :Total Kernels ), Phase( :Number Popped ), Part( :Brand ) ),
Chart( Position( 2 ), Points( Statistic( "Moving Range Centered" ) ) )
);
rpt = obj << report;
Code Explanation:
- Open table.
- Create control chart.
- Set class to Short Run.
- Define variables.
- Add Total Kernels to Y.
- Add Number Popped to Phase.
- Add Brand to Part.
- Position chart at 2.
- Add moving range points.
- Generate report.
Example 97
Summary: Creates a control chart builder with specific settings for average points and range limits, while disabling two Shewhart charts and hiding the control panel.
Code:
dt = Open("data_table.jmp");
obj2 = dt << Control Chart Builder(
Show Two Shewhart Charts( 0 ),
Variables( Y( :DIAMETER ) ),
Set Subgroup Size( 6 ),
Chart( Points( Statistic( "Average" ) ), Limits( Sigma( "Range" ) ) ),
Show Control Panel( 0 )
);
obj2 << OC Curve;
dtLimits = obj2 << Save Limits( in New Table );
Code Explanation:
- Open data table;
- Create control chart builder.
- Disable two Shewhart charts.
- Set variable to "DIAMETER".
- Define subgroup size as 6.
- Configure chart for average points.
- Use range for limits.
- Hide control panel.
- Generate OC curve.
- Save limits to new table.
Example 98
Summary: Creates a Shewhart Attribute control chart with binomial limits and proportion points, excluding specific rows from the data table.
Code:
dt = Open("data_table.jmp");
dt << select rows( 2 ) << exclude( 1 );
dt << select rows( 3 ) << exclude( 1 );
dt << select rows( 10 ) << exclude( 1 );
dt << select rows( 14 ) << exclude( 1 );
obj2 = dt << Control Chart Builder(
Class( Shewhart Attribute ),
Variables( Y( :"# defective"n ), n Trials( :Lot Size ) ),
Chart( Points( Statistic( "Proportion" ) ), Limits( Sigma( "Binomial" ) ) ),
Show Control Panel( 0 )
);
obj2 << OC Curve;
dtLimits = obj2 << Save Limits( in New Table );
Code Explanation:
- Open data table;
- Exclude row 2.
- Exclude row 3.
- Exclude row 10.
- Exclude row 14.
- Create control chart.
- Set chart type to Shewhart Attribute.
- Define Y variable as "# defective".
- Set n Trials to "Lot Size".
- Add proportion points and binomial limits.
- Disable control panel.
- Generate OC curve.
- Save limits to new table.
Example 99
Summary: Creates a Shewhart Attribute control chart with Poisson limits, using the DIAMETER variable and 6 trials, and generates an OC curve.
Code:
dt = Open("data_table.jmp");
obj2 = dt << Control Chart Builder(
Class( Shewhart Attribute ),
Variables( Y( :DIAMETER ) ),
n Trials( 6 ),
Chart( Points( Statistic( "Count" ) ), Limits( Sigma( "Poisson" ) ) ),
Show Control Panel( 0 )
);
obj2 << OC Curve;
dtLimits = obj2 << Save Limits( in New Table );
Code Explanation:
- Open data table.
- Create control chart builder.
- Set chart type to Shewhart Attribute.
- Specify Y variable as DIAMETER.
- Set number of trials to 6.
- Add points statistic as Count.
- Use Poisson for limits.
- Hide control panel.
- Generate OC curve.
- Save limits to new table.
Example 100
Summary: Creates a Shewhart Attribute control chart to analyze the proportion of DIAMETER values, with limits set using the Poisson distribution and OC curve generation.
Code:
dt = Open("data_table.jmp");
obj2 = dt << Control Chart Builder(
Class( Shewhart Attribute ),
Variables( Y( :DIAMETER ) ),
n Trials( 6 ),
Chart( Points( Statistic( "Proportion" ) ), Limits( Sigma( "Poisson" ) ) ),
Show Control Panel( 0 )
);
obj2 << OC Curve;
dtLimits = obj2 << Save Limits( in New Table );
Code Explanation:
- Open data table.
- Create control chart builder object.
- Set chart type to Shewhart Attribute.
- Specify variable for analysis.
- Define number of trials.
- Configure chart to show proportion.
- Set limits using Poisson distribution.
- Hide control panel.
- Generate OC curve.
- Save limits to new table.
Control Chart Builder using Set Modeling Type
Summary: Creates a control chart to examine the relationship between :DAY and :DIAMETER, utilizing the Control Chart Builder platform.
Code:
dt = Open("data_table.jmp");
:DAY << Set Modeling Type( Continuous );
obj = dt << Control Chart Builder( Variables( Subgroup( :DAY ), Y( :DIAMETER ), Phase( :Phase ) ) );
Code Explanation:
- Open table.
- Set DAY as continuous.
- Create control chart.
Control Chart Builder using Column
Summary: Creates a control chart for the 'Delay' column in a data table, specifying spec limits and defining subgroup and Y variables.
Code:
dt = Open("data_table.jmp");
Column( "Delay" ) << Set Property( "Spec Limits", {LSL( -10 ), USL( 40 ), Target( 15 ), Show Limits( 1 )} );
ccb = Control Chart Builder( Show Control Panel( 0 ), Variables( "Subgroup"(:Day), "Y"(:Delay) ) );
Code Explanation:
- Open data table;
- Set spec limits for "Delay" column.
- Create Control Chart Builder object.
- Hide control panel.
- Define "Day" as subgroup variable.
- Define "Delay" as Y variable.
Control Chart Builder using For
Summary: Generates a control chart for continuous variables in a specified data table, utilizing Control Chart Builder and filtering out rows with an empty lot_id.
Code:
dt = Open("data_table.jmp");
myrs2 = dt << get rows where( :lot_id == "lot02" );
For( j = 1, j <= N Items( myrs2 ), j++,
:lot_id[myrs2[j]] = ""
);
lstStatistic = {"Average", "Range", "Standard Deviation", "Moving Range on Means", "Moving Range on Std Dev"};
lstSigma = {"Range", "Standard Deviation", "Moving Range", "Median Moving Range"};
obj = dt << Control Chart Builder(
Size( 534, 464 ),
Show Control Panel( 0 ),
Variables( Subgroup( :lot_id ), Subgroup( :wafer, Position( 1 ) ), Y( :INM1 ) ),
Chart( Position( 1 ), Points( Statistic( lstStatistic[1] ) ), Limits( Sigma( lstSigma[1] ) ) ),
Chart( Position( 2 ), Points( Statistic( lstStatistic[2] ) ), Limits( Sigma( lstSigma[2] ) ) ),
Chart( Position( 3 ), Points( Statistic( lstStatistic[3] ) ), Limits( Sigma( lstSigma[3] ) ) ),
Chart( Position( 4 ), Points( Statistic( lstStatistic[4] ) ), Limits( Sigma( lstSigma[4] ) ) ),
Chart( Position( 5 ), Points( Statistic( lstStatistic[5] ) ), Limits( Sigma( lstSigma[4] ) ) ),
Local Data Filter( Add Filter( columns( :lot_id ), Where( :lot_id != {""} ), ) )
);
Code Explanation:
- Open data table.
- Identify rows with lot_id "lot02".
- Clear lot_id for identified rows.
- Define statistics list.
- Define sigma list.
- Create control chart builder object.
- Set chart size.
- Hide control panel.
- Configure variables and subgroups.
- Add charts with specified statistics and limits.
Control Chart Builder using Set Row States
Summary: Creates a Control Chart to analyze height data, defining age as a subgroup variable and plotting average statistic points.
Code:
dt = Open("data_table.jmp");
dt << Set Row States(
[8960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
);
dt << Control Chart Builder(
Variables( Subgroup( :age, Position( 1 ) ), Y( :height ) ),
Chart( Position( 1 ), Points( Statistic( "Average" ) ) )
);
Code Explanation:
- Open data table;
- Set row states for dataset.
- Launch Control Chart Builder.
- Define age as subgroup variable.
- Define height as Y variable.
- Position chart at 1.
- Plot average statistic points.
Control Chart Builder using Add Rows
Summary: Creates a control chart builder with subgroup, Y, and phase variables, adding six rows to the data table and sending the report to an outline box.
Code:
dt = Open("data_table.jmp");
dt << Add Rows( 6, At End( 1 ) );
Control Chart Builder(
Variables( Subgroup( :DAY ), Y( :DIAMETER ), Phase( :Phase ) ),
Chart(
Position( 1 ),
Warnings( Test 1( 1 ), Test 2( 1 ), Test 3( 1 ), Test 4( 1 ), Test 5( 1 ), Test 6( 1 ), Test 7( 1 ), Test 8( 1 ) )
),
Show Control Panel( 0 ),
SendToReport( Dispatch( {}, "DIAMETER Limit Summaries", OutlineBox, {Close( 1 )} ) )
);
Code Explanation:
- Open data table.
- Add six rows to table.
- Create control chart builder.
- Set subgroup variable.
- Set Y variable.
- Set phase variable.
- Position chart.
- Enable all warnings.
- Hide control panel.
- Close limit summaries outline.
Control Chart Builder using Log Capture
Summary: Creates a Control Chart Builder object with two charts, one for individual points and another for moving range, using variables sex, height, and age.
Code:
dt = Open("data_table.jmp");
Log Capture(
obj = dt << Control Chart Builder(
Variables( "Subgroup"(:sex), "Y"(:height), "Phase"(:age) ),
Chart( Position( 1 ), Points( Statistic( "Individual" ) ), Limits( Sigma( "Moving Range" ) ) ),
Chart( Position( 2 ), Points( Statistic( "Moving Range on Std Dev" ) ), Limits( Sigma( "Range" ) ) )
)
);
Code Explanation:
- Open data table.
- Start log capture.
- Create Control Chart Builder object.
- Define variables: sex, height, age.
- Add first chart for individual points.
- Set limits using moving range.
- Add second chart for moving range.
- Set limits using range.
- End log capture.
Control Chart Builder using Rows
Summary: Creates a Control Chart Builder object for rare event analysis, selecting specific rows and excluding others, with points statistic and Negative Binomial limits.
Code:
dt = Open("data_table.jmp");
dt << Select
Rows(
{1, 2, 3, 4, 5, 6, 7, 8, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40}
) << exclude;
obj = dt << Control Chart Builder(
Class( "Rare Event" ),
Variables( Subgroup( :sex ), Y( :height ) ),
Show Excluded Region( 1 ),
Chart( Points( Statistic( "Count" ) ), Limits( Sigma( "Negative Binomial" ) ) )
);
Code Explanation:
- Open data table;
- Select specific rows.
- Exclude selected rows.
- Create Control Chart Builder object.
- Set chart class to "Rare Event".
- Define subgroup and Y variables.
- Show excluded region.
- Add points statistic.
- Set limits using Negative Binomial.
Control Chart Builder using For Each
Summary: Creates and customizes control charts for multiple samples using the Control Chart Builder platform in JMP.
Code:
plat_samples = ["Control Chart Builder" => {"IMR Chart with Tests"}, => {}];
dt = Open("data_table.jmp");
For Each( {sample}, plat_samples["Control Chart Builder"],
obj = dt << Control Chart Builder( Variables( Y( :Weight ), Subgroup( :Sample ) ) );
Eval( Eval Expr( obj << Apply Preset( "Sample Presets", Expr( sample ) ) ) );
obj << Set Report Title( sample );
);
Code Explanation:
- Define
plat_samplesarray. - Open data table;
- Loop through each preset.
- Create control chart object.
- Apply selected preset.
- Set report title.
- Repeat for all presets.
Control Chart Builder using JSL Quote
Summary: Creates a control chart and graph builder with transformed variables, utilizing JMP's Control Chart Builder and Graph Builder platforms.
Code:
contents = JSL Quote(
dt=Open("data_table.jmp");
obj=dt<<Control Chart Builder();
ccbb=Report(obj)[Graph Builder Box(1)];
ccbb<<Add Variable({Transform Column( "First[sex]", Character,
Formula(Word(1, :sex))), Role("Y")});
);
Include( Char To Blob( contents ), <<New Context );
Open("data_table.jmp");
gb = Graph Builder( Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y ), Smoother( X, Y ) ) );
Report( gb )[Graph Builder Box( 1 )] << Add Variable( {Transform Column( "age0", "Numeric", Formula( :age + 0 ) ), Role( "Wrap" )} );
Code Explanation:
- Open data table.
- Create control chart builder object.
- Access graph builder box.
- Add transformed sex variable as Y role.
- Convert JSL code to blob.
- Include JSL code in new context.
- Open data_table data table again.
- Create graph builder with height and weight.
- Access graph builder box.
- Add transformed age variable as wrap role.
Control Chart Builder using Lock Data Table
Example 1
Summary: Creates and customizes control charts for 'Acid' data, while also generating a new table with row state properties.
Code:
dt = Open("data_table.jmp");
dt << Lock Data Table( 1 );
cc = dt << Control Chart Builder(
Show Control Panel( 0 ),
Variables( "Y"(:Acid) ),
Chart( Position( 1 ), Points( Statistic( "Individual" ) ), Limits( Sigma( "Moving Range" ) ), Connecting Line( 1 ) ),
Chart( Position( 2 ), Points( Statistic( "Moving Range" ) ), Limits( Sigma( "Moving Range" ) ), Connecting Line( 1 ) )
);
dt << Lock Data Table( 0 );
cc << in column;
prop = Column( "Acid" ) << Get Property( "Control Limits" );
Close( dt, no save );
dt = New Table( "RowStateTest",
Add Rows( 3 ),
New Column( "Numerics", Numeric, Continuous, Format( "Best", 12 ), Set Values( [1, 2, 3] ) ),
New Column( "RS", Row State, Row State, Set Values( [0, 0, 0] ) )
);
dt << Save( "$TEMP/RowStateTest.jmp" );
Close( dt, no save );
Try( Delete File( "$TEMP/RowStateTest.jmp" ) );
dtnew = New Table( "RowStateCustom",
Add Rows( 9 ),
New Column( "Data", Numeric, Continuous, Format( "Best", 12 ), Set Values( [1, 2, 3, 4, 5, 6, 7, 8, 9] ) ),
New Column( "RS", Row State, Row State, Set Values( [2, 4, 131088, 8, 768, 9216, 9328, 140448, 9392] ) )
);
Code Explanation:
- Open data table.
- Lock data table.
- Create control chart for "Acid".
- Disable control panel.
- Plot individual points for "Acid".
- Set limits using moving range.
- Connect data points.
- Plot moving range.
- Set limits using moving range.
- Connect moving range points.
- Unlock data table.
- Insert control chart into column.
- Retrieve control limits property.
- Close data_table.jmp without saving.
- Create new table "RowStateTest".
- Add 3 rows.
- Add "Numerics" column.
- Set "Numerics" values.
- Add "RS" column.
- Set "RS" values.
- Save "RowStateTest.jmp" to $TEMP.
- Close "RowStateTest.jmp" without saving.
- Delete "RowStateTest.jmp" from $TEMP.
- Create new table "RowStateCustom".
- Add 9 rows.
- Add "Data" column.
- Set "Data" values.
- Add "RS" column.
- Set "RS" values.
Example 2
Summary: Creates a control chart builder object with individual points and moving range charts, utilizing JMP's Control Chart Builder platform.
Code:
dt = Open("data_table.jmp");
dt << Lock Data Table( 1 );
cc = dt << Control Chart Builder(
Show Control Panel( 0 ),
Variables( "Y"(:Acid) ),
Chart( Position( 1 ), Points( Statistic( "Individual" ) ), Limits( Sigma( "Moving Range" ) ), Connecting Line( 1 ) ),
Chart( Position( 2 ), Points( Statistic( "Moving Range" ) ), Limits( Sigma( "Moving Range" ) ), Connecting Line( 1 ) )
);
dt << Lock Data Table( 0 );
cc << in column;
prop = Column( "Acid" ) << Get Property( "Control Limits" );
Code Explanation:
- Open data table.
- Lock data table for editing.
- Create control chart builder object.
- Hide control panel.
- Set Y variable to Acid.
- Add individual points chart.
- Set limits using moving range.
- Enable connecting lines.
- Add moving range chart.
- Retrieve control limits property.
Control Chart Builder using New Window
Example 1
Summary: Creates a Control Chart Builder in JMP, generating three charts for average points, moving range on means, and range points with limits based on sigma.
Code:
dt = Open("data_table.jmp");
nw = New Window( "Test",
dt << Control Chart Builder(
Show Control Panel( 0 ),
Variables( Subgroup( :DAY ), Y( :DIAMETER ) ),
Chart( Position( 1 ), Points( Statistic( "Average" ) ), Limits( Sigma( "Range" ) ), Connecting Line( 1 ) ),
Chart( Position( 2 ), Points( Statistic( "Moving Range on Means" ) ), Limits( Sigma( "Moving Range" ) ) ),
Chart( Position( 3 ), Points( Statistic( "Range" ) ), Limits( Sigma( "Range" ) ), Connecting Line( 1 ) )
)
);
Code Explanation:
- Open data table;
- Create new window titled "Test".
- Initialize Control Chart Builder.
- Hide control panel.
- Set subgroup variable to DAY.
- Set Y variable to DIAMETER.
- Add first chart for average points.
- Add limits based on range sigma.
- Connect average points with lines.
- Add second chart for moving range on means.
- Add limits based on moving range sigma.
- Add third chart for range points.
- Add limits based on range sigma.
- Connect range points with lines.
Example 2
Summary: Creates a control chart builder object in JMP, using the 'Sample' variable as the Y-axis and 'Phase' as the X-axis, with Shewhart attribute and variables classes applied.
Code:
dt = Open("data_table.jmp");
New Window( "test",
H List Box(
obj = dt << Control Chart Builder(
Variables( Y( :Sample ), Phase( :Phase ) ),
Chart( Points( Statistic( "Proportion" ) ), Limits( Sigma ) ),
Class( shewhart attribute ),
Class( shewhart variables ),
)
)
);
Code Explanation:
- Open data table;
- Create new window titled "test".
- Add horizontal list box.
- Insert control chart builder object.
- Set Y variable to "Sample".
- Set Phase variable to "Phase".
- Plot proportion statistic.
- Use sigma limits.
- Apply Shewhart attribute class.
- Apply Shewhart variables class.
Example 3
Summary: Creates side-by-side control charts for height and weight data, cloning limit summaries and appending them to the chart.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
nw = New Window( "Side by Side",
H List Box(
//height control chart
ccheight = dt << Control Chart Builder( Variables( Y( :height ) ), Show Control Panel( 0 ) );
//get copy of limits summary
ccheightsummary = Report( ccheight )["Control Chart Builder", "height Limit Summaries", List Box( 1 )] << clone box;
//hide original limits summary
ccheight << Show Limit Summaries( 0 );
//put cloned summaries at bottom of window
Report( ccheight )["Control Chart Builder"] << append( ccheightsummary );
, //comma here to separate these, but it's not needed. So, one could just loop through a list of columns instead of hard-coding.
//repeat for weight control chart
ccweight = dt << Control Chart Builder( Variables( Y( :weight ) ), Show Control Panel( 0 ) );
ccweightsummary = Report( ccweight )["Control Chart Builder", "weight Limit Summaries", List Box( 1 )] << clone box;
ccweight << Show Limit Summaries( 0 );
Report( ccweight )["Control Chart Builder"] << append( ccweightsummary );
)
);
Code Explanation:
- Set default names.
- Open data table.
- Create new window titled "Side by Side".
- Add horizontal list box.
- Generate height control chart.
- Clone height limit summaries.
- Hide original height limit summaries.
- Append cloned summaries to chart.
- Generate weight control chart.
- Clone weight limit summaries.
- Hide original weight limit summaries.
- Append cloned summaries to chart.
Control Chart Builder using Select Rows
Summary: Creates control charts and reports from a data table, utilizing the Control Chart and Control Chart Builder platforms in JMP.
Code:
dt = Open("data_table.jmp");
dt << Select Rows( [25] ) << Exclude;
obj = dt << Control Chart(
Use Excluded Points on MR,
Group Size( 1 ),
KSigma( 3 ),
Chart Col( :Weight, Individual Measurement, Moving Range )
);
rpt = obj << report;
obj2 = dt << Control Chart Builder( Use Excluded Points on MR( 1 ), Variables( Y( :Weight ) ) );
rpt2 = obj2 << report;
Code Explanation:
- Open data table.
- Select row 25.
- Exclude selected row.
- Create control chart.
- Set group size to 1.
- Set KSigma to 3.
- Add weight column.
- Generate report.
- Create control chart builder.
- Generate second report.
Control Chart Builder using New Column
Example 1
Summary: Creates a control chart with two Shewhart charts to monitor and analyze the 'Diameter/10000' column in a data table, utilizing subgroup size 6 and range limits.
Code:
dt = Open("data_table.jmp");
dt << New Column( "Diameter/10000", Numeric, "Continuous", Formula( :Diameter / 10000 ) );
obj2 = dt << Control Chart Builder(
Show Two Shewhart Charts( 0 ),
Variables( Y( :"Diameter/10000"n ) ),
Set Subgroup Size( 6 ),
Chart( Points( Statistic( "Average" ) ), Limits( Sigma( "Range" ) ) ),
Show Control Panel( 0 )
);
obj2 << OC Curve;
dtLimits = obj2 << Save Limits( in New Table );
Code Explanation:
- Open data table.
- Create new column.
- Divide Diameter by 10000.
- Build control chart.
- Use two Shewhart charts.
- Set subgroup size to 6.
- Display average points.
- Use range for limits.
- Hide control panel.
- Generate OC curve.
- Save limits to new table.
Example 2
Summary: Creates a control chart with OC curve and saves limits to a new table, utilizing Control Chart Builder and formula-based calculations.
Code:
dt = Open("data_table.jmp");
dt << New Column( "Diameter*10000", Numeric, "Continuous", Formula( :Diameter * 10000 ) );
obj2 = dt << Control Chart Builder(
Show Two Shewhart Charts( 0 ),
Variables( Y( :"Diameter*10000"n ) ),
Set Subgroup Size( 6 ),
Chart( Points( Statistic( "Average" ) ), Limits( Sigma( "Range" ) ) ),
Show Control Panel( 0 )
);
obj2 << OC Curve;
dtLimits = obj2 << Save Limits( in New Table );
Code Explanation:
- Open table.
- Create new column.
- Apply formula to column.
- Launch Control Chart Builder.
- Configure chart settings.
- Add subgroup size.
- Define chart elements.
- Hide control panel.
- Generate OC Curve.
- Save limits to new table.
Example 3
Summary: Creates a Shewhart Attribute control chart with binomial limits and generates an OC curve to monitor the proportion of defective items in a dataset.
Code:
dt = Open("data_table.jmp");
dt << New Column( "# non-defective", Numeric, "Continuous", Formula( :Lot Size - :"# defective"n ) );
obj2 = dt << Control Chart Builder(
Class( Shewhart Attribute ),
Variables( Y( :"# defective"n ), n Trials( :Lot Size ) ),
Chart( Points( Statistic( "Proportion" ) ), Limits( Sigma( "Binomial" ) ) ),
Show Control Panel( 0 )
);
obj2 << OC Curve;
dtLimits = obj2 << Save Limits( in New Table );
Code Explanation:
- Open table.
- Create new column.
- Initialize Control Chart Builder.
- Set chart type to Shewhart Attribute.
- Specify Y variable and trials.
- Configure points and limits.
- Hide control panel.
- Generate OC Curve.
- Save limits to new table.
Example 4
Summary: Creates a control chart to monitor non-defective items in a production process, utilizing Shewhart Attribute and Binomial limits.
Code:
dt = Open("data_table.jmp");
dt << New Column( "# non-defective", Numeric, "Continuous", Formula( :Lot Size - :"# defective"n ) );
obj2 = Control Chart Builder(
Class( Shewhart Attribute ),
Variables( Y( :"# non-defective"n ), n Trials( :Lot Size ) ),
Chart( Points( Statistic( "Count" ) ), Limits( Sigma( "Binomial" ) ) ),
Show Control Panel( 0 )
);
obj2 << OC Curve;
dtLimits = obj2 << Save Limits( in New Table );
Code Explanation:
- Open data table.
- Create new column for non-defectives.
- Initialize Control Chart Builder.
- Set chart type to Shewhart Attribute.
- Define variables: non-defectives, lot size.
- Configure chart with points and limits.
- Hide control panel.
- Generate OC curve.
- Save control limits to new table.
Example 5
Summary: Creates a control chart with Poisson limits and generates an OC curve for analyzing the 'Diameter/10000' column in a data table.
Code:
dt = Open("data_table.jmp");
dt << New Column( "Diameter/10000", Numeric, "Continuous", Formula( :Diameter / 10000 ) );
obj2 = dt << Control Chart Builder(
Class( Shewhart Attribute ),
Variables( Y( :"Diameter/10000"n ) ),
n Trials( 6 ),
Chart( Points( Statistic( "Count" ) ), Limits( Sigma( "Poisson" ) ) ),
Show Control Panel( 0 )
);
obj2 << OC Curve;
dtLimits = obj2 << Save Limits( in New Table );
Code Explanation:
- Open data table;
- Create new column "Diameter/10000".
- Apply formula to new column.
- Launch Control Chart Builder.
- Set chart type to Shewhart Attribute.
- Select "Diameter/10000" as variable.
- Set n Trials to 6.
- Configure chart with Count statistic.
- Use Poisson limits.
- Hide control panel.
- Generate OC Curve.
- Save limits to new table.
Example 6
Summary: Creates a control chart for continuous data, using Shewhart Attribute class and configuring points and limits with Poisson sigma limits.
Code:
dt = Open("data_table.jmp");
dt << New Column( "Diameter*10000", Numeric, "Continuous", Formula( :Diameter * 10000 ) );
obj2 = dt << Control Chart Builder(
Class( Shewhart Attribute ),
Variables( Y( :"Diameter*10000"n ) ),
n Trials( 6 ),
Chart( Points( Statistic( "Count" ) ), Limits( Sigma( "Poisson" ) ) ),
Show Control Panel( 0 )
);
obj2 << OC Curve;
dtLimits = obj2 << Save Limits( in New Table );
Code Explanation:
- Open data table.
- Create new column.
- Multiply Diameter by 10000.
- Build control chart.
- Set chart type to Shewhart Attribute.
- Select "Diameter*10000" for Y variable.
- Set n Trials to 6.
- Configure chart points and limits.
- Hide control panel.
- Generate OC Curve.
- Save limits to new table.
Example 7
Summary: Creates a control chart with an OC curve for analyzing continuous data, utilizing Control Chart Builder and specifying variables, trials, and chart elements.
Code:
dt = Open("data_table.jmp");
dt << New Column( "Diameter/10000", Numeric, "Continuous", Formula( :Diameter / 10000 ) );
obj2 = dt << Control Chart Builder(
Class( Shewhart Attribute ),
Variables( Y( :"Diameter/10000"n ) ),
n Trials( 6 ),
Chart( Points( Statistic( "Proportion" ) ), Limits( Sigma( "Poisson" ) ) ),
Show Control Panel( 0 )
);
obj2 << OC Curve;
dtLimits = obj2 << Save Limits( in New Table );
Code Explanation:
- Open table.
- Create new column.
- Apply formula to column.
- Build control chart.
- Set chart type.
- Define variables.
- Set number of trials.
- Configure chart elements.
- Hide control panel.
- Generate OC curve.
- Save limits to new table.
Example 8
Summary: Creates a Shewhart Attribute control chart with OC Curve and limits, using the Diameter*10000 column as input.
Code:
dt = Open("data_table.jmp");
dt << New Column( "Diameter*10000", Numeric, "Continuous", Formula( :Diameter * 10000 ) );
obj2 = dt << Control Chart Builder(
Class( Shewhart Attribute ),
Variables( Y( :"Diameter*10000"n ) ),
n Trials( 6 ),
Chart( Points( Statistic( "Proportion" ) ), Limits( Sigma( "Poisson" ) ) ),
Show Control Panel( 0 )
);
obj2 << OC Curve;
dtLimits = obj2 << Save Limits( in New Table );
Code Explanation:
- Open data table.
- Create new column.
- Multiply Diameter by 10000.
- Launch Control Chart Builder.
- Set chart type to Shewhart Attribute.
- Add Diameter*10000 to Y variables.
- Set n Trials to 6.
- Configure points and limits.
- Hide control panel.
- Generate OC Curve.
- Save limits to new table.
Control Chart Builder using Delete Columns
Summary: Creates and customizes a Model Driven Multivariate Control Chart (MDMCC) with T Square plots for each part, followed by the generation of a Short Run Control Chart Builder.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
//cleanup
dt << Delete Columns( {:name, :sex} );
dt:age << set name( "Part" );
mdmcc = dt << Model Driven Multivariate Control Chart(
Process( :height, :weight ),
By( :Part )
);
//get number of different parts/skus
nparts = n items(Associative Array(:Part) <<Get Keys);
for each ({i}, 1::nparts,
mdmcc[i] << T Square Plot (Save Values)
);
//make short run cc
ccb = dt << Control Chart Builder(
Class( Short Run ),
Variables( Y( :T² By Part ), Part( :Part ) ),
Show Control Panel( 0 )
);
//cleanup
mdmcc << close window;
Code Explanation:
- Set default names.
- Open data table;
- Delete name and sex columns.
- Rename age column to Part.
- Create Model Driven Multivariate Control Chart.
- Set process variables height and weight.
- Group by Part.
- Get number of unique parts.
- Loop through each part.
- Save T Square plot values.
- Create Short Run Control Chart Builder.
- Set chart type to Short Run.
- Add T² By Part and Part variables.
- Hide control panel.
- Close Model Driven Multivariate Control Chart window.