cancel
Showing results for
Show  only  | Search instead for
Did you mean:
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
Choose Language Hide Translation Bar
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
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",
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} )
);

Jim
4 REPLIES 4
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",
theColumn = rb << get;
Distribution( Continuous Distribution( Column( cc[theColumn] ) ) )
)
);``````
Jim
Level V

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",
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} )
);

Jim
Level V