cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar

How to script frame size of fits in fit curve platform with group variable

Hi all!

 

In JMP 15 it was easy to modify the frame size of the fits in the fit curve platform using a group variable.

In JMP 17 it seems to be different. Even if I modify the frame sizes manually and I try to get the appropriate script by using "Save By-Group Script to Script Window" I don't get a script with modified frame sizes.

 

For example I may use the following script:

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = dt << Fit Curve(
	Y( :weight ),
	X( :height ),
	Group( :sex ),
	Fit Linear,
	SendToReport(
		Dispatch(
			{"Plot"},
			"Fit Curve Report",
			FrameBox,
			{Frame Size( 316, 134 ), Marker Drawing Mode( "Normal" )}
		),
		Dispatch(
			{"Plot"},
			"Fit Curve Report",
			FrameBox( 2 ),
			{Frame Size( 316, 134 ), Marker Drawing Mode( "Normal" )}
		),
		Dispatch(
			{"Plot"},
			"Fit Curve Report",
			FrameBox( 3 ),
			{Frame Size( 316, 134 ), Marker Drawing Mode( "Normal" )}
		)
	)
);

My question is how to modify the frame size of the linear fits:

PolygonStallion_0-1698561812064.png

Sorry, if the issue was already posted.

Many thanks in advance for your help.

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How to script frame size of fits in fit curve platform with group variable

I would use XPath to get the reference to all Frameboxes and then pick from those all I want to modify. Below is example where the size of all frameboxes is modified

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
obj = dt << Fit Curve(Y(:weight), X(:height), Group(:sex), Fit Linear);

fbs = Report(obj) << XPath("//FrameBox");

wait(1); // for demo purposes

fbs << Frame Size(316, 134);
-Jarmo

View solution in original post

3 REPLIES 3
jthi
Super User

Re: How to script frame size of fits in fit curve platform with group variable

I would use XPath to get the reference to all Frameboxes and then pick from those all I want to modify. Below is example where the size of all frameboxes is modified

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
obj = dt << Fit Curve(Y(:weight), X(:height), Group(:sex), Fit Linear);

fbs = Report(obj) << XPath("//FrameBox");

wait(1); // for demo purposes

fbs << Frame Size(316, 134);
-Jarmo

Re: How to script frame size of fits in fit curve platform with group variable

Hi jthi,

Many thanks for your reply. Your solution works very well.

 

I'm just wondering why it's not possible to manually resize the window to generate a script that does the same thing.

jthi
Super User

Re: How to script frame size of fits in fit curve platform with group variable

Quickly checking it seems like JMP isn't able to capture the modifications done to the FrameBoxes which are within Linear outlinebox.

-Jarmo