I have a code "sample.jsl" which has a loop to create a bi-var plot for each column. I am trying to add a range slider box to this loop so that once I run the script it creates one graph for all the columns with separate range slider box for each graph.
The limits for all the x-axis columns are in "limits.jmp" and the datafile is "Data.jmp". The code "sample.jsl" creates one graph each for all the parameters at once. I want to modifly the code so that it also adds a range slider box to all the graphs.
The range slider box should have the upper control limits (ucl) and lcl as the two dynamic sliders.
I have this code which creates the range slider box but it just works for a single graph. I need a script which creates all the graphs together with the dynamic range slider boxes.
Any help would be appreciated. Thanks in advance
myFinalDisplay = expr(
myLimitCol = column(dt, "ColA"); //new
myLimitMin = colMinimum(myLimitCol); show(myLimitMin); //new
myLimitMax = colMaximum(myLimitCol); show(myLimitMax); //new
mylcl = globalLCL["ColA];
myucl = globalUCL["ColA];
myGbDispObj = dt << Bivariate(
Size( 550, 400 ),
Y( "res" ),
X( "ColA" ),
Automatic Recalc( 1 ),
Histogram Borders( 1 ),
Summary Statistics( 1 ),
Fit Spline( 2, {Line Color( {212, 73, 88} )} ),
SendToReport(
Dispatch(
{},
"Bivar Plot",
FrameBox,
{Row Legend(
"Grouping",
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 1 ),
Marker Theme( "Solid" ),
Continuous Scale( 1 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
),
Dispatch(
{},
"1",
ScaleBox,
{Add Ref Line({mylcl, myucl}, "Solid", "Light YellowGreen", "", 1, 0.20 )}
),
Dispatch( {}, "Summary Statistics", OutlineBox, {Close( 1 )} )
)
);
myTbLo = textBox(Char(round(myLimitMin, 2)) || " (OOC = " || char(0.00, 10, 2) || "%)");
myTbHi = textBox(Char(round(myLimitMax, 2)) || " (OOC = " || char(0.00, 10, 2) || "%)");
mySbDispObj = rangeSliderBox();
mySbDispObj = rangeSliderBox(
myLimitMin,
myLimitMax,
mylcl,
myucl,
//script
mySelectedLower = mySbDispObj << getLower;
mySelectedUpper = mySbDispObj << getUpper;
myGbDispObj << Dispatch( {}, "1", ScaleBox, {Add Ref Line( mySelectedLower, "Dashed", "blue", "LCL", 4 )} );
myGbDispObj << Dispatch( {}, "1", ScaleBox, {Add Ref Line( mySelectedUpper, "Dashed", "blue", "UCL", 4 )} );
rUpper = dt << Get Rows Where( myLimitCol[] > mySelectedUpper );
OOC_valUpper = (N Items(rUpper) / Col Number( Column(dt, "ColA") ))*100;
myTbHi << setText(Char(round(mySelectedUpper, 1)) || " (OOC = " || char(OOC_valUpper, 10, 2) || "%)");
rLower = dt << Get Rows Where( myLimitCol[] < mySelectedLower );
OOC_valLower = (N Items(rLower) / Col Number( Column(dt, "ColA") ))*100;
myTbLo << setText(Char(round(mySelectedLower, 1)) || " (OOC = " || char(OOC_valLower, 10, 2) || "%)");
);
mySbDispObj << Set Width( 275 );
myLayout = vListBox(
myGbDispObj,
hListBox(myTbLo, spacerBox(size(50,0)), myTbHi),
mySbDispObj
);
);
@pmroz
@txnelson