cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar

Questions about control charts

Hello,

 

I hope you are doing well.

 

I have two questions about the the Jmp script (JSL):

 

  1. How can I get control chart with only 1 control limit (upper or lower)? If I define only one control limit, the other is still computed using the data.
  2. Is there any way to show on the control chart the index of the points that break a Nelson rule (see screenshot below, the two points out of control limit are associated with their index)

    PersuasionCamel_0-1667386675175.png

    Thank you very much and have a nice day,

Jean

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Questions about control charts

If you click on Help->Scripting Index, you can search for Show Lower Limit in the Filter box.  That will give you the following JSL example.

Names Default To Here( 1 );
dt = Open(
	"$SAMPLE_DATA/Quality Control/Coating.jmp"
);
obj = dt <<
Control Chart Builder(
	Variables( Subgroup( :Sample ), Y( :Weight ) ),
	Chart(
		Position( 1 ),
		Limits( Show Lower Limit( 0 ) )
	)
);

You can read more about how to use the row label command in the documentation here: Label Rows and Columns (jmp.com)

View solution in original post

7 REPLIES 7
ian_jmp
Level X

Re: Questions about control charts

JMP has more than one way to make a control chart. Could you please share which menu option you are using?

Re: Questions about control charts

I use these lines of code in my script (in a draft state): 

 

dt << Control Chart Builder(
	Size( 534, 464 ),
	Show Two Shewhart Charts( 0 ),
	Show Control Panel( 0 ),
	Show Capability( 1 ),
	Variables(
		Subgroup( :column(Sample) ),
		Y( :column(Variable) ),
		Phase( :column(Period) )
	),
	Chart(
		Points( Statistic( "Individual" ) ),
		Add Spec Limits( {LSL( LSL_def ), USL( USL_def )} ),
		Set Control Limits( {LCL( LCL_def ), UCL( UCL_def ), Avg( Avg )} ),
		Warnings( Test 1( 1 ), Test 2( 1 ), Test 3( 1 ) )
	),
	SendToReport(
		Dispatch(
			{},
			CQA,
			ScaleBox,
			{Min( Min(LCL_def, LSL_def)-1 ), Max( Max(UCL_def, USL_def)+1 ), Inc( 1 ), Minor Ticks( 0 ),
			Add Ref Line( LSL_def, "Solid", "Blue", "LSL="||char(LSL_def), 2 ),
			Add Ref Line( USL_def, "Solid", "Blue", "USL="||char(USL_def), 2 ),
			Add Ref Line( LCL_def, "Solid", "Red", "LCL="||char(LCL_def), 1 ),
			Add Ref Line( UCL_def, "Solid", "Red", "UCL="||char(UCL_def), 1 ),
			
			Add Ref Line( Avg, "", "Green", "UCL="||char(Avg), 1 )
			}
		),
		Dispatch(
			{},
			"Control Chart Builder",
			FrameBox,
			{DispatchSeg(
				TextSeg( 3 ),
				{Line Color( "None" ), Fill Color( "None" )}
			), DispatchSeg(
				TextSeg( 4 ),
				{Line Color( "None" ), Fill Color( "None" )}
			)}
		)
	)
);

Thank you very much!

 

Jean

Re: Questions about control charts

To show only the upper limit, use the following command 

 Show Lower Limit( 0 )

To show only the lower limit, use the following command

Show Upper Limit( 0 )

To display the subgroup for the tests that violate the nelson rules, you have several options, you can hover over the points that violate the tests and when the hover label appears, you can pin the hover label.

Or you could add the label role to the sample column in the data table and then use the row label command.

Re: Questions about control charts

Tank you very much for your answer.

Where in the code can I add:

 Show Lower Limit( 0 )

And how can I use the "row label command" ?

 

Thank you very much !

 

Jean

Re: Questions about control charts

If you click on Help->Scripting Index, you can search for Show Lower Limit in the Filter box.  That will give you the following JSL example.

Names Default To Here( 1 );
dt = Open(
	"$SAMPLE_DATA/Quality Control/Coating.jmp"
);
obj = dt <<
Control Chart Builder(
	Variables( Subgroup( :Sample ), Y( :Weight ) ),
	Chart(
		Position( 1 ),
		Limits( Show Lower Limit( 0 ) )
	)
);

You can read more about how to use the row label command in the documentation here: Label Rows and Columns (jmp.com)

Re: Questions about control charts

A last question, last question. I often have this type of error :

PersuasionCamel_0-1667484118305.png

My Period column is made of "Previous", "Current" and "Next" elements.

How can I fix this error ?

 

Thank you very much !

 

Jean

Re: Questions about control charts

Typically this issue is encountered when there is a column and a JSL variable with the same name.  While possible, it just means that you have to be specific in the code. So be sure you are using proper scoping so that JMP understands whether you meant the JSL variable or the column.