Script for Group by and Fit each valueI have a script in the Custom toolbar that turns character columns into numeric, which I use all the time.
I also use Group by and Fit each value whenever I have a suitable graph ready.
Now I want a script that, when I already have an x-y graph, does Group by and Fit each value. The below script works as I tried it on Big Class.jmp, but I want it to do just the Group by and Fit each value, on an already existing graph. I guess I need to define obj so that it points to the graph, but how?
Names Default To Here(1);
dt = Current Data Table();
obj = dt << Bivariate(Y(:Weight), X(:Height));
obj << Group By(:Sex);
obj << Fit Each Value;

Automation and ScriptingWindowsRe: Script for Group by and Fit each valueSend << get xml message to your object reference (rep in this case). Then from log try to see if there is something what you could use to get access to correct outlineboxes

If you have JMP17 I think helpKey is usually quite good bet. You could also possibly use outlinebox names.
After you have those outlinebox references, modify script as needed
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt = Fit Group(
Bivariate(Y(:height), X(:age)),
Bivariate(Y(:weight), X(:age)),
<<{Arrange in Rows(1)}
);
rep = Current Report();
obs = rep << XPath("//OutlineBox[@helpKey = 'Bivariate Report']");
objs = obs << Get Scriptable Object;
// might have to add check if you have correct type of report open
objs << Group By(:Sex);
objs << Fit Each Value;Re: Script for Group by and Fit each valueGive me the little finger and I'll take the hand! That worked so good, that now I would like the same thing to work when I have more than one plot in the report, e.g. when I have plotted more than one parameter or by group. Tried experimenting with 'xPath' that I found in the forum, but no success. Syntax is everything.

Re: Script for Group by and Fit each valueAppears to work wonderfully! Thanks a lot!
Re: Script for Group by and Fit each valueDepending on how robust script you want and with what type of reports you want it to work with, you might have to modify this
Names Default To Here(1);
rep = Current Report();
obj = rep[OutlineBox(1)] << Get Scriptable Object;
// might have to add check if you have correct type of report open
obj << Group By(:Sex);
obj << Fit Each Value;