Below are some examples for the JSL options (there are plenty of different ways of doing these):
Example for the graphic script option:
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
dist = dt << Distribution(
Continuous Distribution(
Column(:height),
Always use column properties(1),
Process Capability(0)
),
Column Switcher(:height, {:height, :weight})
);
Report(dist)[FrameBox(1)] << Add Graphics Script(Function({this},
m = ((this << Top Parent)[OutlineBox("Summary Statistics"), Number Col Box(1)] << get)[1];
Pen Color("Purple");
Pen Size(5);
H Line(m);
));
Example for the column switch handler:
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
dist = dt << Distribution(
Continuous Distribution(
Column(:height),
Always use column properties(1),
Process Capability(0)
)
);
cw = dist << Column Switcher(:height, {:height, :weight});
post = Function({previousColumn, currentColumn, switcher},
prevm = Col Mean(previousColumn);
m = Col Mean(currentColumn);
axisbox = Report(dist)[axis box(1)];
Try(axisbox << Remove Ref Line(prevm));
axisbox << Add Ref Line(m, "Dashed", blue, "Mean", 2);
wait(0);
);
handler = cw << Make Column Switch Handler(Empty(), post);
-Jarmo