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
MachineElk431
Level II

Get 'By' Property when using SendToByGroup JSL

Hello,

 

I have a question regarding Variability Chart using JSL script. I have a variability chart using SendToGroupBy. In this JSL script I take a screenshot of each chart created from SendToGroupBy. But I want to append the png file with the property name that it is grouped by. In the example below, I want to append the FileName png file name with Example1. How can I get that access property value? Any help would be appreciated.

 

MachineElk431_0-1727373714426.png

 

MachineElk431_3-1727373138331.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
MachineElk431
Level II

Re: Get 'By' Property when using SendToByGroup JSL

Posting the reply I got from JMP support here for visibility. Works for JMP 17.0.0

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dists = dt << Distribution(
	By( :Sex ),
	SendToByGroup(
		{:sex == "F"},
		Continuous Distribution( Column( :weight ), Normal Quantile Plot( 1 ) )
	),
	SendToByGroup( {:sex == "M"}, Continuous Distribution( Column( :weight ) ) )
);

For Each( {dist}, dists, expr = dist << get script;
	Print( Arg( Extract Expr( expr, Where( Wild() ) ) ) )
);

dist << Get Where Expr works for JMP 18

View solution in original post

6 REPLIES 6
jthi
Super User

Re: Get 'By' Property when using SendToByGroup JSL

<< Get Where Expr might work

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

dists = dt << Distribution(
	By(:Sex),
	SendToByGroup(
		{:sex == "F"},
		Continuous Distribution(Column(:weight), Normal Quantile Plot(1))
	),
	SendToByGroup({:sex == "M"}, Continuous Distribution(Column(:weight)))
);

For Each({dist}, dists,
	show(dist << Get Where Expr);
);
-Jarmo
MachineElk431
Level II

Re: Get 'By' Property when using SendToByGroup JSL

Hi Jarmo,

 

Thank you for your reply. Unfortunately, when I try the sample script returns dist << Get Where Expr Distribution[]. Am I missing something? Should there be some expression to access the dist obj?

jthi
Super User

Re: Get 'By' Property when using SendToByGroup JSL

Which JMP version are you using? I think that might be a new thing in JMP18.

-Jarmo
MachineElk431
Level II

Re: Get 'By' Property when using SendToByGroup JSL

I am using JMP 17.0.0

MachineElk431
Level II

Re: Get 'By' Property when using SendToByGroup JSL

Posting the reply I got from JMP support here for visibility. Works for JMP 17.0.0

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dists = dt << Distribution(
	By( :Sex ),
	SendToByGroup(
		{:sex == "F"},
		Continuous Distribution( Column( :weight ), Normal Quantile Plot( 1 ) )
	),
	SendToByGroup( {:sex == "M"}, Continuous Distribution( Column( :weight ) ) )
);

For Each( {dist}, dists, expr = dist << get script;
	Print( Arg( Extract Expr( expr, Where( Wild() ) ) ) )
);

dist << Get Where Expr works for JMP 18

jthi
Super User

Re: Get 'By' Property when using SendToByGroup JSL

That is what I would have suggested for earlier versions of JMP also. And I I did that even in JMP18 until I did figure out that JMP18 has few useful messages regarding using by and where in platforms (at least << Get Where Expr and << Get By Levels)

-Jarmo