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
DavidLeber
Level III

Editing Control Chart after Creation

I'm trying to create a script to format the output of the Process Screening tool's control charts so they're more pretty. Obviously, I can't go in and change the code of the Process Screening tool itself, so the problem I'm faced with is:

 

Given a preexisting control chart object, how can I:

1. Add a column to the subgrouping

2. Delete the Moving Range graph

 

For reference, I currently have a myControlChart object on which I was able to successfully run myControlChart<<showLimitSummaries(0);.

1 ACCEPTED SOLUTION

Accepted Solutions
DavidLeber
Level III

Re: Editing Control Chart after Creation

I was able to find a solution! The key was getting the graph builder box.

 

 

var = Current Report();    //Returns a reference to the report that's currently open, i.e. the Control Chart generated by Process Screening

gbb = var[GraphBuilderBox( 1 )];    //Returns a reference to the actual Graph

gbb << removeVariable( 1 );    //This is a case of lucky guess - not sure why this removes the moving average chart, but it does.

gbb << addVariable( {:Month, Role( "Subgroup" )} );  //Adds the month to the "X Axis" of the control chart.

 

 

I hope this helps anyone in the future!

View solution in original post

2 REPLIES 2
SDF1
Super User

Re: Editing Control Chart after Creation

Hi @DavidLeber,

 

  You might have more luck working with the Control Chart Builder under Analyze->Quality and Process.

 

  If you drop your column on the y-axis it'll generate the chart and then you can inspect the JSL code from the red hot button. You'd get something like this (if you also have an x-column):

Control Chart Builder(
	Show Two Shewhart Charts( 0 ),
	Show Capability( 0 ),
	Variables( Subgroup (:X-column here ), Y( :Y-column here ) ),
	Chart( Position (1), Points( Statistic( "Individual" ) ), Limits( Sigma( "Moving Range" ) ) ),
	Chart( Position( 2 ), Limits( Sigma( "Moving Range" ) ) )
);

  To address your second point, just eliminate the "Poisition(1)," part and the whole section on "Chart( Position (2)....". Then you'll just get the XBar chart.

 

  You could also go to Analyze->Quality and Process->Control Chart->Xbar, for example, depending on what you're really after.

 

  I'm not sure I understand what you are wanting to do with your first point.

 

Hope this helps!,

DS

DavidLeber
Level III

Re: Editing Control Chart after Creation

I was able to find a solution! The key was getting the graph builder box.

 

 

var = Current Report();    //Returns a reference to the report that's currently open, i.e. the Control Chart generated by Process Screening

gbb = var[GraphBuilderBox( 1 )];    //Returns a reference to the actual Graph

gbb << removeVariable( 1 );    //This is a case of lucky guess - not sure why this removes the moving average chart, but it does.

gbb << addVariable( {:Month, Role( "Subgroup" )} );  //Adds the month to the "X Axis" of the control chart.

 

 

I hope this helps anyone in the future!