cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

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