cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
JosephMaurer
Level I

Reference lines in control chart builder

 

I am working in Control Chart Builder and attempting to add a reference line in any plot that isn’t the XBar chart, like such

3-way.PNG

When I save the script to the window, and run said script, the reference line on the S Chart is gone, which is sad. This problem holds for any chart made in Control Chart Builder that is not an XBar chart. Here is the code that is saves to the Table.

 

script.PNG

 

Please help, thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
cwillden
Super User (Alumni)

Re: Reference lines in control chart builder

Hey @JosephMaurer

Welcome to the community! I'm not sure why Dispatch stuff is not working in the script.  You want to customize a specific axis box, and for whatever reason, the scale box stuff is not working.  I tried replacing the ScaleBox reference with the appropriate axis box reference, but that didn't work.

So, here's a good work around:

1. Get the control chart builder object as a report and save it as a variable.

2. Send a message to the appropriate axis box to update the max value and draw the ref line.

Here's an example with an X-bar and S chart.  I found the appropriate axis box by looking in the tree structure.

ccb = Control Chart Builder(
	Size( 522, 446 ),
	Show Control Panel( 0 ),
	Show Capability( 0 ),
	Variables( Subgroup( :Group ), Y( :X ) ),
	Chart( Position( 1 ) ),
	Chart(
		Position( 2 ),
		Points( Statistic( "Standard Deviation" ) ),
		Limits( Sigma( Standard Deviation ) )
	),
	SendToReport(
		Dispatch(
			{},
			"X",
			Axis Box( 3 ),
			{Max( 7.82258064516129 ), Add Ref Line(
				6,
				"Dashed",
				"Medium Dark Blue",
				"",
				2
			)}
		)
	)
) << Report;

ccb[axisbox(3)] << Max(8);
ccb[axisbox(3)] << Add Ref Line(6,"Dashed","Medium Dark Blue","SDWL",2);

You can delete everything in the SendToReport function.

Hope that helps!

-- Cameron Willden

View solution in original post

1 REPLY 1
cwillden
Super User (Alumni)

Re: Reference lines in control chart builder

Hey @JosephMaurer

Welcome to the community! I'm not sure why Dispatch stuff is not working in the script.  You want to customize a specific axis box, and for whatever reason, the scale box stuff is not working.  I tried replacing the ScaleBox reference with the appropriate axis box reference, but that didn't work.

So, here's a good work around:

1. Get the control chart builder object as a report and save it as a variable.

2. Send a message to the appropriate axis box to update the max value and draw the ref line.

Here's an example with an X-bar and S chart.  I found the appropriate axis box by looking in the tree structure.

ccb = Control Chart Builder(
	Size( 522, 446 ),
	Show Control Panel( 0 ),
	Show Capability( 0 ),
	Variables( Subgroup( :Group ), Y( :X ) ),
	Chart( Position( 1 ) ),
	Chart(
		Position( 2 ),
		Points( Statistic( "Standard Deviation" ) ),
		Limits( Sigma( Standard Deviation ) )
	),
	SendToReport(
		Dispatch(
			{},
			"X",
			Axis Box( 3 ),
			{Max( 7.82258064516129 ), Add Ref Line(
				6,
				"Dashed",
				"Medium Dark Blue",
				"",
				2
			)}
		)
	)
) << Report;

ccb[axisbox(3)] << Max(8);
ccb[axisbox(3)] << Add Ref Line(6,"Dashed","Medium Dark Blue","SDWL",2);

You can delete everything in the SendToReport function.

Hope that helps!

-- Cameron Willden