I 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;
![Ake_0-1700591711105.png Ake_0-1700591711105.png](https://community.jmp.com/t5/image/serverpage/image-id/58997i732C4851ADF90E20/image-size/medium?v=v2&px=400)