Please see the script below for the changes required to handle your new requests. In most cases, any list of columns will be able to be substituted into a Platform request, with an Eval() function, which expresses the list to JMP. See the
Eval( colList )
in the script below.
Assuming you have now read the section on Display Trees in the Scripting Guide, the messages that can be passed to the Display Objects are documented with examples in the Scripting Index
Help==>Scripting Index
Examining the Messages for AxisBox(), you will see all of the messages available. Among which is Inc(). It is this changing of the increment of the axis that is being used to insure values in the graph after changing the min and max axis values.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
colList = {"NPN1", "PNP1"};
For( i = 1, i <= N Items( colList ), i++,
// Turn on Show Limits
spec = Column( dt, colList[i] ) << Get Property( "Spec Limits" );
If( Is Empty( spec ) == 0,
LSL = Try( spec["LSL"], . );
USL = Try( spec["USL"], . );
Target = Try( spec["Target"], . );
Eval(
Substitute(
Expr(
Column( dt, colList[i] ) << Set Property(
"Spec Limits",
{LSL( __LSL__ ), USL( __USL__ ), Target( __Target__ ), Show Limits( 1 )}
),
),
Expr( __LSL__ ), LSL,
Expr( __USL__ ), USL,
Expr( __Target__ ), Target
)
);
);
);
// create the graphs
ow = Oneway(
Y(
eval(colList)
),
X( :site ),
All Graphs( 0 ),
Plot Quantile by Actual( 1 ),
Line of Fit( 0 ),
Std Dev Lines( 1 ),
Legend( 0 ),
SendToReport(
Dispatch(
{"Normal Quantile Plot"},
"Oneway QuantilePlot",
FrameBox,
{Row Legend(
Corner,
Color( 1 ),
Color Theme( "" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
);
owr = ow << report;
// adjust the axes
For( i = 1, i <= N Items( owr ), i++,
spec = Column( dt, colList[i] ) << Get Property( "Spec Limits" );
(owr[i])[AxisBox( 2 )] << Min( spec["LSL"] ) << Max( spec["USL"] )
<< inc ((spec["USL"] - spec["LSL"]) / 10 );
);
Jim