無法使用數組重命名標籤頁大家好 ,
我試圖使用數組重命名標籤頁,但它沒有這樣做,有人可以告訴我是什麼問題?
step [i]似乎無法重命名標籤頁。
step = {};
step = {1,2,3,4};
New Window( "Example", nwbb = Tab Box() );
For( i = 1, i <= n Items(step), i++,
nwbb <<ADD></ADD>Re:無法使用數組重命名標籤頁JMP沒有將選項卡名稱作為可以在解釋它之前進行評估的項目來處理,因此,我傾向於使用的方法是使用Substitution()函數生成所需的語句,該函數提供給JMP解釋器,完全填寫的代碼流。 下面的示例處理您想要的內容:
step = {};
step = {1, 2, 3, 4};
New Window( "Example", nwbb = Tab Box() );
For( i = 1, i <= N Items( step ), i++,
Eval(
Substitute(
Expr(
nwbb << Add(
Tab Page Box(
__step__,
TB = Tab Box(
Tab Page Box(
"Summary",
Data Table To Table Box(dt)
),
Tab Page Box(
"Pareto Chart",
ob1 = Outline Box( "Pareto Chart",
dt << Distribution( Column( :Height, :Weight ), By( :sex ) )
)
)
)
)
)
),
Expr( __step__ ), Char( step[i] )
)
)
);Re:無法使用數組重命名標籤頁 @kuannygoh ,
我嘗試運行代碼時注意到的一些事情是:
1。你的parantheses是不平衡的。
2。數據表到表格框 - 我不知道JMP中的這個功能
感謝Discovery Summit(我相信這是 @pmroz 的工作) - 有一個例子,我可以從帽子拉出標籤框。除非您看到其他內容,否則您的問題可能與命名無關。如果您是 - 請分享您的日誌和您關注的快照
dt = open("$sample_data\Candy Bars.jmp", invisible);
xcol = "Calories";
ycols = {"Total fat g", "Saturated fat g", "Cholesterol g"};
gw = new window("Graphical Output",
outlinebox(xcol || " vs:",
tb = tab box()
)
);
for(i = 1, i <= nitems(ycols), i++,
ycol = ycols[i];
tb << add(ycol, vlistbox(
dt << Graph Builder(
Size( 530, 450 ),
Show Control Panel( 0 ),
Variables( X( as column( xcol ) ), Y( as column( ycol ) ) ),
Elements( Points( X, Y, Legend( 5 ) ), Smoother( X, Y, Legend( 6 ) ) )
),
));
);