I am working on a script to cycle through a list of properties and make a pair of control charts for each. The pair (by "Line") of charts must be displayed side-by-side and have the same Y-axis scaling.
I have a list of properties (a list variable called CCProperty), and a list of axis settings for each property (a matrix variable called CCFormat). Even though I used the same numbers (as CCFormat[i,j]) for min, max, increment, and number of ticks for each graph, the scales do not consistently match.
Any help would be appreciated. I am using JMP Pro 18.1.1
The full data table with embedded script is attached. Here's a snippet of the code:
For(i=1, i <= N Items(CCProperty), i += 1, // Loop through all the properties and make control charts using the graph min and max
Mainbox<<append(hb=H List Box()); //Append the horizontal box with the two graphs to the mainbox
//*********Generate the Control Chart for LINE 1:**************
hb<<append(Control Chart Builder(
Size( 650, 600 ),Graph Spacing( 10 ),
Test Excluded Subgroups( 0 ),Show Limit Labels( 1 ),Show Capability( 0 ),Show Limit Summaries( 0 ),
Variables( Subgroup( :Workorder ), Y(column(CCProperty[i])) ),
Chart(Position( 1 ),Points( Statistic( "Average" ) ),Limits( Sigma( "Moving Range" ), Spec Limits( 1 ) ) ),
Chart(Position( 2 ),Points( Statistic( "Moving Range on Means" ) ),Limits( Sigma( "Moving Range" ) ) ),
Chart(Position( 3 ),Points( Statistic( "Standard Deviation" ) ),Limits( Sigma( "Standard Deviation" ) ) ),
Show Control Panel( 0 ),
By( :Line ),
Where( :Line == "Line 1" ),
SendToReport(Dispatch(CCProperty, ScaleBox,{Min( CCFormat[i,1] ),Max( CCFormat[i,2] ),Inc( CCFormat[i,3] ),Minor Ticks( CCFormat[i,4] )} ),
),
));
//*********Generate the Control Chart for LINE 2:**************
hb<<append(Control Chart Builder(
Size( 650, 600 ),Graph Spacing( 10 ),
Test Excluded Subgroups( 0 ),Show Limit Labels( 1 ),Show Capability( 0 ),Show Limit Summaries( 0 ),
Variables( Subgroup( :Workorder ), Y(column(CCProperty[i])) ),
Chart(Position( 1 ),Points( Statistic( "Average" ) ),Limits( Sigma( "Moving Range" ), Spec Limits( 1 ) ) ),
Chart(Position( 2 ),Points( Statistic( "Moving Range on Means" ) ),Limits( Sigma( "Moving Range" ) ) ),
Chart(Position( 3 ),Points( Statistic( "Standard Deviation" ) ),Limits( Sigma( "Standard Deviation" ) ) ),
Show Control Panel( 0 ),
By( :Line ),
Where( :Line == "Line 2" ),
SendToReport(Dispatch(CCProperty, ScaleBox,{Min( CCFormat[i,1] ),Max( CCFormat[i,2] ),Inc( CCFormat[i,3] ),Minor Ticks( CCFormat[i,4] )}),
),
));
); //end of For Loop