我正在尝试跳过 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() 并检查索引。