Hi all!
I want to insert a text in frames in the fit curve platform using a Group and a By variable via JSL (JMP 18).
Therefore I tried the following code, but it doesn't work:
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
obj = dt << Fit Curve(Y(:weight), X(:height), Group(:sex), Fit Linear, By(:age));
robj = obj << report;
(robj << XPath(
"(//OutlineBox[text()='Fit Curve']//OutlineBox[text()='age=12']//OutlineBox[text()='Linear']//OutlineBox[text()='Plot']//FrameBox)[2]"
)) << Add Graphics Script( 1, Description( "Script" ), Text( {52, 120}, "F 12" ) );
I copied the XPath from the properties of the frame using Mode: XPath and Root: Window.
In JMP 17, this works with the following code:
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
obj = dt << Fit Curve(Y(:weight), X(:height), Group(:sex), Fit Linear, By(:age));
robj = obj << report;
(robj << XPath( "(//OutlineBox[text()='Fit Curve age=12']//OutlineBox[text()='Linear']//OutlineBox[text()='Plot']//FrameBox)[2]" )) <<
Add Graphics Script( 1, Description( "Script" ), Text( {52, 120}, "F 12" ) );
The result should look like this for Fit curve age=12 (screenshot from JMP 17):
Many thanks for your help!