cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
lehaofeng
Level V

如何编JSL语句让分布分析自动把变化

我写了一个程序,但并没有随着我选择单选框的价值,自动改变。

Names Default To Here( 1 );

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

cc={"身高", "体重"};

New Window( "Example",
aa=1;

rb = Radio Box( {"身高", "体重"},

     aa= rb<<get();

     bb<<inval;
     bb<<update window

),



bb=Distribution(

Stack( 1 ),

Continuous Distribution(

Column( cc[aa] ),

Horizontal Layout( 1 ),

Vertical( 0 )

),
Histograms Only,

))
  ;

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: 如何编JSL语句让分布分析自动把变化

See if this is what you want

Names Default To Here( 1 );

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

cc = {"height", "weight"};

nw = New Window( "Chooser",
	rb = Radio Box(
		cc,
		theColumn = rb << get;
		Try( dis << delete );
		vlb << append( dis = Distribution( Continuous Distribution( Column( cc[theColumn] ) ) ) );
	),
	vlb = V List Box(
		dis = Distribution( Continuous Distribution( Column( cc[1] ) ) )
		
	)
);

But what I really think you should use, is the builtin Column Switcher

txnelson_0-1674717307477.png

Names Default To Here( 1 );

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

Distribution(
Continuous Distribution( Column( :height ), Always use column properties( 1 ) ),
Column Switcher( :height, {:height, :weight} )
);

 

 

Jim

View solution in original post

4 REPLIES 4
txnelson
Super User

Re: 如何编JSL语句让分布分析自动把变化

This may be what you are looking for

Names Default To Here( 1 );

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

cc = {"height","weight"};

nw = new window("Chooser",
	rb= radio box(cc,
		theColumn = rb << get;
		Distribution( Continuous Distribution( Column( cc[theColumn] ) ) )
	)
);
Jim
lehaofeng
Level V

Re: 如何编JSL语句让分布分析自动把变化

我是想让窗口内容随着radio box的选择,自动更新。之前的窗口关闭,更新为新的。

txnelson
Super User

Re: 如何编JSL语句让分布分析自动把变化

See if this is what you want

Names Default To Here( 1 );

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

cc = {"height", "weight"};

nw = New Window( "Chooser",
	rb = Radio Box(
		cc,
		theColumn = rb << get;
		Try( dis << delete );
		vlb << append( dis = Distribution( Continuous Distribution( Column( cc[theColumn] ) ) ) );
	),
	vlb = V List Box(
		dis = Distribution( Continuous Distribution( Column( cc[1] ) ) )
		
	)
);

But what I really think you should use, is the builtin Column Switcher

txnelson_0-1674717307477.png

Names Default To Here( 1 );

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

Distribution(
Continuous Distribution( Column( :height ), Always use column properties( 1 ) ),
Column Switcher( :height, {:height, :weight} )
);

 

 

Jim
lehaofeng
Level V

Re: 如何编JSL语句让分布分析自动把变化

非常感谢,太棒了!

Recommended Articles