When generating a plot in Graph Builder, it does a good job of autoscaling the Y-axis to the outermost data points. However, this doesn't consider the spec limit values, which are generally outside of the outermost data. So a spec limit may not be visible.
Is there a setting, button, method, or, (preferably), a simple JSL way of getting the Y-axis scaling to default to the outermost of data & spec limits? (A brute force method would be to loop on checking min & max of all data & spec limits, then setting the axis range just beyond those values. But I'm hoping to avoid this.)
Example plot below showing the LSL cut off from the 4th of 5 box plots.
Is your x axis coming from 5 different columns, or from 1 ordinal/nominal column with 5 levels?
Is the "Show Limits" checkbox selected in the Spec Limits Column Property? If this is checked, and the Y Axis Setting have not been specified, then by default, the Spec Limits should be displayed
What version of JMP, what operating system?
Thanks, Jim. JMP Pro 17.2.0 on MacOS. They are 5 different columns, but the script is actually built by another JSL script, so might look a little different — (see below).
Looks like Y Axis Setting is not specified. In Column Properties, I see "Show as Graph Reference Lines" (if that's what you're referring to). However, checking that box, then creating a new graph via Graph Builder doesn't seem to fix the issue.
Perhaps, is it possible to suggest a piece of JSL in the script below to enable the feature you describe?
Graph Builder(
Size( 1000, 700 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables(
X(
"stage_10",
Combine( "Parallel Merged" )
),
X(
"stage_2",
Position( 1 ),
Combine( "Parallel Merged" )
),
X(
"stage_4",
Position( 1 ),
Combine( "Parallel Merged" )
),
X(
"stage_5",
Position( 1 ),
Combine( "Parallel Merged" )
),
X(
"stage_6",
Position( 1 ),
Combine( "Parallel Merged" )
)
),
Elements(
Box Plot(
X( 1 ),
X( 2 ),
X( 3 ),
X( 4 ),
X( 5 ),
Legend( 3 ),
Jitter( "Random Normal" )
),
Caption Box( X( 1 ), Legend( 4 ), Summary Statistic( "N" ) )
),
SendToReport(
Dispatch(
{},
"stage_10",
ScaleBox,
{Label Row(
{Tick Mark(
Label( "stage_10" ),
Label( "10" )
), Tick Mark(
Label( "stage_2" ),
Label( "2" )
), Tick Mark(
Label( "stage_4" ),
Label( "4" )
), Tick Mark(
Label( "stage_5" ),
Label( "5" )
), Tick Mark(
Label( "stage_6" ),
Label( "6" )
), Set Font Size( 14 ), Label Orientation( "Horizontal" )}
)}
),
Dispatch( {}, "", ScaleBox, {Label Row( Set Font Size( 14 ) )} ),
Dispatch(
{},
"graph title",
TextEditBox,
{Set Text( "My Graph" )}
),
Dispatch( {}, "X title", TextEditBox, {Set Text( "" )} ),
Dispatch(
{},
"Graph Builder",
FrameBox,
{DispatchSeg( Text Seg( 1 ), {Font( "Helvetica", 18 )} )}
)
)
)Specifying multiple variables for the X axis seems to negate the auto scaling for the Spec Limits. The only solution that I see would be to add to your JSL the setting of the Y to set the axis min and max;