cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
miguello
Level VI

How to remove smoothing spline controls from bivariate fit

How do I delete Smoothing spline controls? I have a report with bunch of splines and this list of controls takes the whole page effectively collapsing the chart. I only need splines for visual guide, I don't care about the numbers. How do I remove it?

2022-03-23 16_57_21-Clipboard.png

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How to remove smoothing spline controls from bivariate fit

Use Show Properties to see under which display elements those are, then you can navigate report layer to set visibility to collapse. Here is quick example with XPath

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
biv = dt <<Bivariate(
	Y(:height),
	X(:weight),
	Fit Line({Line Color({76, 114, 176})}),
	Fit Spline(0.1, {Line Color({221, 132, 82})})
);

(Report(biv) << XPath("//BorderBox"))[2] << Visibility("Collapse");

//this might collapse too much, so make sure it doesn't
(Report(biv) << XPath("//IfBox")) << Visibility("Collapse");
-Jarmo

View solution in original post

6 REPLIES 6
jthi
Super User

Re: How to remove smoothing spline controls from bivariate fit

Use Show Properties to see under which display elements those are, then you can navigate report layer to set visibility to collapse. Here is quick example with XPath

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
biv = dt <<Bivariate(
	Y(:height),
	X(:weight),
	Fit Line({Line Color({76, 114, 176})}),
	Fit Spline(0.1, {Line Color({221, 132, 82})})
);

(Report(biv) << XPath("//BorderBox"))[2] << Visibility("Collapse");

//this might collapse too much, so make sure it doesn't
(Report(biv) << XPath("//IfBox")) << Visibility("Collapse");
-Jarmo
miguello
Level VI

Re: How to remove smoothing spline controls from bivariate fit

Thanks, 

 

I was able to figure out what to do. I guess I just needed a way to get bunch of border boxes at once.

Anyways, couple of questions - For me collapsing IfBoxes collapses pretty much everything - window is empty. This is because I have other IfBoxes on the plot.

If I only use 

XPath("//BorderBox")

it will take care of the boxes in red frame:

2022-03-23 16_57_21-Clipboard.png

Boxes in green frame that are controlling the splines below - those stay.

I can solve it by saying Report View ("Summary") when building the plot, so all in all it works, but I'm still wondering - how would I isolate those IfBoxes - Can I say something like 

Xpath("//OutlineBox/IfBox")

(this one didn't work).

 

Here's full script:

/* Open a sample data table */
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );

Fit Group(
biv = dt << Bivariate(
	Y( {:weight, :weight} ),
	X( :height ),
	/*Report View ("Summary"),*/
	Group By ("sex"),
	Fit Spline( 0.1, Standardized),
	SendToReport(
		Dispatch(
			{},
			"Bivar Plot",
			FrameBox,
			{DispatchSeg( Line Seg( 2 ), {Line Color( {66, 112, 221} )} )}
		)
	)
),
<<{Arrange in Rows( 3 )}
);

For Each({rbiv, index}, biv << Report, 
(
rbiv << XPath("//BorderBox"))[2]<<Visibility("Collapse");
/*rbiv << Xpath("//IfBox")<< Visibility("Collapse");*/
);

I can make it work by uncommenting "Report View", but I also would like to understand how to do that using XPath (commented line at the end results in empty window).

 

 

jthi
Super User

Re: How to remove smoothing spline controls from bivariate fit

Use << Get Xml (or you can try with << Show Properties) to see what the report layer looks like. Then based on that you can build more complicated Xpaths.

 

Names Default To Here(1);

/* Open a sample data table */
dt = Open("$SAMPLE_DATA\Big Class.jmp");

g = Fit Group(
	biv = dt << Bivariate(
		Y({:weight, :weight}),
		X(:height),
		Report View("Summary"),
		Group By("sex"),
		Fit Spline(0.1, Standardized),
		SendToReport(Dispatch({}, "Bivar Plot", FrameBox, {DispatchSeg(Line Seg(2), {Line Color({66, 112, 221})})}))
	), <<{Arrange in Rows(3)}
);

Clear log();
Write(g << get xml); 
-Jarmo
miguello
Level VI

Re: How to remove smoothing spline controls from bivariate fit

Thanks, that's good to know.

I figured why it wasn't working in my case and was working in yours - parenthesis.

/* Open a sample data table */
dt = Open( "$SAMPLE_DATA\Big Class.jmp" );

Fit Group(
biv = dt << Bivariate(
	Y( {:weight, :weight} ),
	X( :height ),
	/*Report View ("Summary"),*/
	Group By ("sex"),
	Fit Spline( 0.1, Standardized),
	SendToReport(
		Dispatch(
			{},
			"Bivar Plot",
			FrameBox,
			{DispatchSeg( Line Seg( 2 ), {Line Color( {66, 112, 221} )} )}
		)
	)
),
<<{Arrange in Rows( 3 )}
);

For Each({rbiv, index}, biv << Report, 
(
rbiv << XPath("//BorderBox"))[2]<<Visibility("Collapse");
//This way it works
(rbiv << Xpath("//IfBox"))<< Visibility("Collapse");
);
jthi
Super User

Re: How to remove smoothing spline controls from bivariate fit

One more thing came to my mind related to IfBox is that they do have special property. You can set the "if value" to 0 or 1, so it might be better idea than setting visibility to "Collapse". You could test by replacing the

(rbiv << Xpath("//IfBox"))<< Visibility("Collapse");

with

(rbiv << Xpath("//IfBox"))<< Set(0);
-Jarmo
miguello
Level VI

Re: How to remove smoothing spline controls from bivariate fit

Thanks a lot again, it does work.

 

While we're on Bivariate Fit platform - any way to change Font of the Legend?

I don't see it anywhere in GUI, and also the Legend seems to be StringColBox, and it doesn't accept anything related to Font.