分層展示框你好,
使用 JSL 創建盒子的分層組的最佳方法是什麼?
例如,我想為每個性別和每個年齡創建一個分佈(Big Class.jmp),然後我想像在文件資源管理器中一樣排列它們。
(請參閱隨附的屏幕截圖)
我希望我的問題很清楚:)
謝謝
湯姆.
回复:分層顯示框使用選項卡框執行此操作的最佳方法是什麼?
@馬克貝利
謝謝!
回复:分層顯示框克雷格,
涼爽的......
回复:分層顯示框還有一個層級框,主要用於石川魚骨圖,但具有 3 種演示風格。
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
window = New Window( "Hierarch", vlb = Hier Box( Text Box( "Big Class" ) ) );
Summarize( sex group = By( :sex ) );
Summarize( age group = By( :age ) );
For( isex = 1, isex <= N Items( sex group ), isex++,
outline = Hier Box( Text Box( "Sex = " || sex group[isex] ) );
For( iage = 1, iage <= N Items( age group ), iage++,
Eval(
Eval Expr(
outline << Append(
Hier Box(
Text Box( "Age = " || age group[iage] ),
Button Box( "Sex is " || sex group[isex] || " and Age is " || age group[iage],
// the button runs a script, use eval(evalexpr(...expr(xxx)))
// to capture a value of a variable that was only available
// while the display box tree was being constructed...
Print( Expr( age group[iage] ), Expr( sex group[isex] ) )
)
)
)
)
);
);
vlb << Append( outline );
);
vlb << changetype( "fishbone" );
Wait( 1 );
vlb << changetype( "hierarchy" );
Wait( 1 );
vlb << changetype( "nested" );
three styles of hier box presentation三種風格的盒子展示
我用按鈕框代替了文本框。 單擊其中之一會顯示:
“13”
“F”
回复:分層顯示框包含樹節點的樹框可能更接近您想要的。
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Summarize( sex group = By( :sex ) );
Summarize( age group = By( :age ) );
gender_tree = {};
For( isex = 1, isex <= N Items( sex group ), isex++,
gnode = tree node( "Gender - " || sex group[isex] );
For( iage = 1, iage <= N Items( age group), iage++,
age_node = tree node(age group[iage]);
gnode << append(age_node);
);
insert into(gender_tree, gnode);
);
nw = New Window( "Hierarchy Tree",
gtree = tree box(gender_tree, size(300, 300),
set max size(600, 600),
set autostretching(1, 1)
)
);
root_list = gtree << get roots;
for (i = 1, i <= nitems(root_list), i++,
gtree << expand(root_list[i]);
);

回复:分層顯示框
在我發布此回復後,我再次嘗試了代碼,沒有問題!對不起馬克!
標記我必須更改您的循環變量,因為它們與 Big Class 中的列名稱相同。
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
window = New Window( "Hierarch", vlb = V List Box() );
Summarize( sex group = By( :sex ) );
Summarize( age group = By( :age ) );
For( isex = 1, isex <= N Items( sex group ), isex++,
outline = Outline Box( "Sex = " || sex group[isex] );
For( iage = 1, iage <= N Items( age group), iage++,
outline << Append(
Outline Box( "Age = " || age group[iage],
Text Box( "Sex is " || sex group[isex] || " and Age is " || age group[iage] )
)
);
Show( isex, iage );
);
vlb << Append( outline );
);
回复:分層顯示框此示例說明了一種方法:
Names Default to Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
window = New Window( "Hierarch", vlb = V List Box() );
Summarize( sex group = By( :sex ) );
Summarize( age group = By( :age ) );
For( sex = 1, sex <= N Items( sex group ), sex++,
outline = Outline Box( "Sex = " || sex group[sex] );
For( age = 1, age <= N Items( age group), age++,
outline << Append(
Outline Box( "Age = " || age group[age],
Text Box( "Sex is " || sex group[sex] || " and Age is " || age group[age] )
)
);
Show( sex, age );
);
vlb << Append( outline );
);