cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
scottahindle
Level IV

How to modify control chart x-axis in Process Screening

Using process screening I quickly get the process performance graph giving the 2x2 matrix of stable/unstable and conforming/non-conforming to gauge where to focus my attention for improvement efforts. This is really useful.

An example is attached.

Since the 12 characteristics in attached have different numbers of data I see the default created control charts always have x-axes that run to the length of the number of rows in the table.

In attached e.g. Characteristic Seven has 583 data but Characteristic Nine only 79 data.

The creation of the control chart for Characteristic Nine has an x-axis convering the 583 data by default. This presentation is not ideal since the first thing I do is change the x-axis, but to so for numerous charts is then time consuming.

Can anybody advise how I use scripting, or some other option, to have the x-axes automatically configured to reflect the number of data that are actually behind each characteristic in each column? Would be great to know how to do this so the pictures created to gain more insight into the data are as informative as possible as quickly as possible.

I just checked and the question would also apply to Control Chart Builder, i.e. which operation to perform on the columns so that each x-axis is scaled to the number of rows having actual data.

1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)

Re: How to modify control chart x-axis in Process Screening

I am not aware of a column property that would fix this, but it can be done with JSL.

 

Here's an example script that loops through each control chart and adapts the x-axis to the number of observations.

dt = Data Table("Process Screening Example");
dt << Process Screening(
    Y(
        :Characteristic One,
        :Characteristic Two,
        :Characteristic Three,
        :Characteristic Four,
        :Characteristic Five,
        :Characteristic Six,
        :Characteristic Seven,
        :Characteristic Eight,
        :Characteristic Nine,
        :Characteristic Ten,
        :Characteristic Eleven,
        :Characteristic Twelve
    ),
    Control Chart Type("Indiv and MR"),
    Process Performance Graph(1),
    Test 2(1),
    Ppk Capability Boundary(1),
    Stability Ratio Boundary(1.2),
    Select All,
    Control Charts for Selected Items,
    SendToReport(Dispatch({"Process Performance Graph"}, "ProcessScreening Graph", FrameBox, {Frame Size(553, 424)}))
);

//get list of Control Chart top Outline Boxes
obs = Current Report() << topparent << xpath("//ListBox/OutlineBox");

// Set x-axis max after each N (retrieved from the "Porcess Summary" boxes)
For(i = 1, i <= N Items(obs), i++,
    psum = obs[i][Outline Box("Process Summary")];
    nloc = Loc((psum << xpath("//StringColBox"))[1] << get, "N")[1]; // locate row of "N"
    n = (psum << xpath("//NumberColBox"))[1][nloc]; // get "N"
    (obs[i] << xpath("//AxisBox"))[1] << Max(n + 0.5); // set max
);

View solution in original post

3 REPLIES 3
ms
Super User (Alumni) ms
Super User (Alumni)

Re: How to modify control chart x-axis in Process Screening

I am not aware of a column property that would fix this, but it can be done with JSL.

 

Here's an example script that loops through each control chart and adapts the x-axis to the number of observations.

dt = Data Table("Process Screening Example");
dt << Process Screening(
    Y(
        :Characteristic One,
        :Characteristic Two,
        :Characteristic Three,
        :Characteristic Four,
        :Characteristic Five,
        :Characteristic Six,
        :Characteristic Seven,
        :Characteristic Eight,
        :Characteristic Nine,
        :Characteristic Ten,
        :Characteristic Eleven,
        :Characteristic Twelve
    ),
    Control Chart Type("Indiv and MR"),
    Process Performance Graph(1),
    Test 2(1),
    Ppk Capability Boundary(1),
    Stability Ratio Boundary(1.2),
    Select All,
    Control Charts for Selected Items,
    SendToReport(Dispatch({"Process Performance Graph"}, "ProcessScreening Graph", FrameBox, {Frame Size(553, 424)}))
);

//get list of Control Chart top Outline Boxes
obs = Current Report() << topparent << xpath("//ListBox/OutlineBox");

// Set x-axis max after each N (retrieved from the "Porcess Summary" boxes)
For(i = 1, i <= N Items(obs), i++,
    psum = obs[i][Outline Box("Process Summary")];
    nloc = Loc((psum << xpath("//StringColBox"))[1] << get, "N")[1]; // locate row of "N"
    n = (psum << xpath("//NumberColBox"))[1][nloc]; // get "N"
    (obs[i] << xpath("//AxisBox"))[1] << Max(n + 0.5); // set max
);
scottahindle
Level IV

Re: How to modify control chart x-axis in Process Screening

Thank you!

Re: How to modify control chart x-axis in Process Screening

Hello,

 

I thought I would post this in case someone found it useful.  Another possible way to achieve this is by creating a new data table with the processes stacked and the missing values removed from the stacked table.  Then you can use the Grouping column in Process Screening to split the table into separate processes.  (Note you also will have to create a spec limits table to use this method if you want the capability calculations since the column properties will disappear in the stacked table. )  The following JSL demonstrates how to do this:

 

dt = Data Table("Process Screening Example");
dtStack = dt << Stack(
	columns(
		:Characteristic One,
		:Characteristic Two,
		:Characteristic Three,
		:Characteristic Four,
		:Characteristic Five,
		:Characteristic Six,
		:Characteristic Seven,
		:Characteristic Eight,
		:Characteristic Nine,
		:Characteristic Ten,
		:Characteristic Eleven,
		:Characteristic Twelve
	),
	Source Label Column( "Label" ),
	Stacked Data Column( "Data" ),
	Output Table( "Stacked Process Screening Example" )
);

dtStack << select where (isMissing(:Data));
dtStack << delete rows;

 obj = dt<< Manage Spec Limits(
	Y(
		:Characteristic One,
		:Characteristic Two,
		:Characteristic Three,
		:Characteristic Four,
		:Characteristic Five,
		:Characteristic Six,
		:Characteristic Seven,
		:Characteristic Eight,
		:Characteristic Nine,
		:Characteristic Ten,
		:Characteristic Eleven,
		:Characteristic Twelve
	)
);
dtLimits = obj << Save to Tall Spec Limits Table;


obj2 = dtStack << Process Screening(
	Y( :Data ),
	Grouping( :Label ),
	Control Chart Type( "Indiv and MR" ),
	Use Limits Table(
		1,
		dtLimits,
		Grouping( :Variable ),
		LSL( :LSL ),
		USL( :USL ),
		Target( :Target ),
		Go
	)
);

obj2 << select all;
obj2 << control charts for selected items;

 

If you just want to do the same thing with Control Chart Builder without launching Process Screening first, you can use the following JSL:

 


dt = Data Table("Process Screening Example");
dtStack = dt << Stack(
	columns(
		:Characteristic One,
		:Characteristic Two,
		:Characteristic Three,
		:Characteristic Four,
		:Characteristic Five,
		:Characteristic Six,
		:Characteristic Seven,
		:Characteristic Eight,
		:Characteristic Nine,
		:Characteristic Ten,
		:Characteristic Eleven,
		:Characteristic Twelve
	),
	Source Label Column( "Label" ),
	Stacked Data Column( "Data" ),
	Output Table( "Stacked Process Screening Example" )
);
dtStack << select where (isMissing(:Data));
dtStack << delete rows;
obj = dtStack << Control Chart Builder( Variables( Y( :Data )), By( :Label  ) );