Scale axis fit groupHello JMP Community,
I am trying to write a jsl code that can scale the axis with button box.
I want to scale axis for all three oneway plots in the fit group.
The below code works only for the first one way chart.
Any suggestions?
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "",
H List Box(
Button Box( "Scale axis ",
Try( fsl = fg << report );
(fsl)[AxisBox( 1 )] << Min( 20 ) << Max( 100 );
),
V List Box(
fg = Fit Group(
Oneway( Y( :height ), X( :name ) ),
Oneway( Y( :height ), X( :age ) ),
Oneway( Y( :height ), X( :sex ) ),
<<{Arrange in Rows( 1 )}
);
)
)
);Thanks,
Jackie
Automation and ScriptingRe: Scale axis fit groupYou could get the references to Axisboxes with XPath. The XPath I use here is most likely not robust enough and should be improved
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("",
H List Box(
Button Box("Scale axis ",
Try(fsl = fg << report;
axisboxes = fsl << XPath("//AxisBox");
axisboxes[1::N Items(axisboxes) - 1::3] << Min(20) << Max(100);
);
),
V List Box(
fg = Fit Group(
Oneway(Y(:height), X(:name)),
Oneway(Y(:height), X(:age)),
Oneway(Y(:height), X(:sex)),
<<{Arrange in Rows(1)}
);
)
)
);
Or you can get references to outline boxes and then loop the AxisBox(1)
ows = fg << XPath("//OutlineBox[contains(text(), 'Oneway Analysis of')]");
For Each({ow}, ows,
ow[AxisBox(1)] <<MIN></MIN>Re: Scale axis fit groupAwesome! Thanks a lot Jarmo!