@avner8943 ,
Attached is a script that uses a RowState Handler to change limits.
Names Default to Here(1);
dt = Open("$Sample_Data/Big Class.jmp");
dt << sort(By(:sex, :age), Replace Table(1));
dt << New Column( "Order", Numeric);
dt:Order << Set Each Value( If( row()==1 | :sex != lag(:sex,1), 1, lag(:Order,1) +1)) ;
dtsum = dt << Summary( Group(:sex), Min(:height), mean(:height), Max(:height));
dtlims = dtsum << Stack(
columns(
:Name( "Min(height)" ),
:Name( "Mean(height)" ),
:Name( "Max(height)" )
),
Source Label Column( "Label" ),
Stacked Data Column( "Limits" )
);
Close(NoSave, dtsum);
f= Function({a}, {TR1, i},
print(a, fb);
// show(a, fb);
for(i=1, i<=nitems(fb), i++,
Try( fb[i] << Remove Graphics Script (1) )
);
TR1 = :Limits[dtlims << get selected rows];
Eval (EvalExpr( fb << Add Graphics Script( H Line( Expr( TR1) ) ) ) );
);
gb = dt << Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( X( :Order ), Y( :height ), Group X(:sex) ),
Elements( Points( X, Y, Legend( 3 ) ), Line( X, Y, Legend( 5 ) ) )
);
fb = gb << Xpath("//FrameBox");
rs = dtlims << Make RowState Handler(f );
Select one or multiple rows or clear all row selections and see the changes on all frameboxes.
This script was tested on JMP 14 & 15. Attached is slight modification of the script at line 26 so that the script works on JMP 13.
So there must be something else wrong with your script, because this works woth a RowState Handler script.