我写了一个程序,但并没有随着我选择单选框的价值,自动改变。
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,
))
;
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
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} )
);
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] ) ) )
)
);
我是想让窗口内容随着radio box的选择,自动更新。之前的窗口关闭,更新为新的。
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
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} )
);
非常感谢,太棒了!