我正在嘗試跳過 Lineup Box 中的一行圖表。 例如,我想要第一行 4 個圖表,第二行 3 個圖表,而不是 4x4 網格,等等。有沒有辦法跳過一行或在“陣容”框中添加換行符?
dt = current data table();
//where dtLookup is the data table containing a list of X and Y columns to plot from dt
nw = New Window( "Outputs", lub = Lineup Box( N Col( 4 ) ) );
For Each Row(dtLookup,
lub << append(
dt <<
Graph Builder(
Size( 500, 350 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables( X( As Column( dt, col_name_X ) ), Y( As Column( dt, col_name_Y) )),
Elements( Points( X, Y, Legend( 5 ) ) )
));
你好,
我不知道 Lineup Box 的“跳過”功能,但有一種解決方法需要一些編程,涉及為您要跳過的每個插槽插入間隔框(與您的繪圖大小相同)。
但是,這有點棘手,因為您需要跳過第一行的 0 個插槽,第二行的 1 個插槽和第三行的 2 個插槽;您不需要跳過最後一行的任何插槽。
為不完整的答案道歉:我沒有時間處理您的腳本,但您可能能夠弄清楚。
最好的,
TS
如果您知道如何構建具有特定列數的 Lineup Boxes,您可以在附加新圖形之前附加 Lineup Box。
這很可能很容易中斷,因為它希望您在 dtlookup 中恰好有 10 (1+2+3+4) 個值(此處使用列表而不是數據表)。
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
dtlookup = {"NPN1", "PNP1","PNP2","NPN2","PNP3","IVP1","PNP4","NPN3","IVP2","NPN4"};
lub_idx = 4;
ongoing_gb = lub_idx;
nw = New Window("Outputs", vlb = V List Box(lub = Lineup Box(N Col(lub_idx))));
For(i = 1, i <= N items(dtlookup), i++,
If(ongoing_gb > 0,
lub << append(
dt << Graph Builder(
Size(200, 150),
Show Control Panel(0),
Show Legend(0),
Variables(X(As Column(dt, dtlookup[i])), Y(As Column(dt, "lot_id"))),
Elements(Points(X, Y, Legend(5)))
)
);
ongoing_gb--;
,
lub_idx = lub_idx - 1;
ongoing_gb = lub_idx;
vlb << Append(lub = Lineup Box(N Col(lub_idx)));
)
);
或者您可以選擇使用 V List Box() 和 H List Box() 並檢查索引。