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
danf
Level III

JSL to save smoother formula from Graph Builder

I have been trying to figure out how to save the smoother formula from Graph Builder using JSL with no success. I also tried to the function Spline Smooth() on a data table but that also did not work for me. What I am trying to do is automate a process that I do over and over using the column that is saved from the smoother in Graph Builder. It is quite lengthy process and I can script all parts of it except the smoother save and everything depends on the column of smoothed data. Does anyone have any ideas.

 

Examples of what I have tried are shown below:

 

Graph Builder(
    Show Control Panel( 0 ),
    Variables( X( :x ), Y( :y ), Overlay( :type ) ),
    Elements( Points( X, Y, Legend( 14 ) ), Smoother( X, Y, Legend( 15 ) ) ),
    Save Smoother Formula( 1 )
);

 

and

 

var = Graph Builder(
    Show Control Panel( 0 ),
    Variables( X( :x ), Y( :y ), Overlay( :type ) ),
    Elements( Points( X, Y, Legend( 14 ) ), Smoother( X, Y, Legend( 15 ) ) ),
);
var << Save Smoother Formula;
2 ACCEPTED SOLUTIONS

Accepted Solutions
Phil_Kay
Staff

Re: JSL to save smoother formula from Graph Builder

No problem.

I did find that you can save the predicted values from a Kernel Smoother fit using the Bivariate (Fit Y by X) platform. See this thread. So that might be a solution for you?

Phil

View solution in original post

XanGregg
Staff

Re: JSL to save smoother formula from Graph Builder

The command on the smoother element in its red triangle menu is Save Formula. You can send it via JSL using the Update Element command.

 

gb = Graph Builder(
	Variables( X( :height ), Y( :weight ) ),
	Elements( Points( X, Y, Legend( 2 ) ), Smoother( X, Y, Legend( 3 )) )
);
gbb = Report( gb )[Graph Builder Box( 1 )];
gbb << Update Element( 1, 1, 2, {Save Formula} );

View solution in original post

6 REPLIES 6
Phil_Kay
Staff

Re: JSL to save smoother formula from Graph Builder

Hi,

In general you should look in the JMP Scripting Index from the help menu to find the command that you need.

In this case though it seems like this is not a scriptable feature. I looked in the Index and could not find anything. I also saw some other questions about this in the JMP Community and they did not have solutions.

You might want to add this to the JMP Wish List.

Regards,

Phil

danf
Level III

Re: JSL to save smoother formula from Graph Builder

Thanks Phil. I'll put in a wish list request.

Phil_Kay
Staff

Re: JSL to save smoother formula from Graph Builder

No problem.

I did find that you can save the predicted values from a Kernel Smoother fit using the Bivariate (Fit Y by X) platform. See this thread. So that might be a solution for you?

Phil

danf
Level III

Re: JSL to save smoother formula from Graph Builder

I think that will probably work. I was just looking at it when you posted this. Thanks!

XanGregg
Staff

Re: JSL to save smoother formula from Graph Builder

The command on the smoother element in its red triangle menu is Save Formula. You can send it via JSL using the Update Element command.

 

gb = Graph Builder(
	Variables( X( :height ), Y( :weight ) ),
	Elements( Points( X, Y, Legend( 2 ) ), Smoother( X, Y, Legend( 3 )) )
);
gbb = Report( gb )[Graph Builder Box( 1 )];
gbb << Update Element( 1, 1, 2, {Save Formula} );
danf
Level III

Re: JSL to save smoother formula from Graph Builder

Thanks Xan! That really works great! I was also able to change the lambda value with a little research in the Scripting Guide. I'm okay with the default but I have found that a different value generally works better for my data. Also I am using an overlay variable and that works great too! I really appreciate the help!