NX = 5; //NX NY are to specify the matrix indices for Graph builder
NY = 5;
If( Is Missing(colX1[i]), NX = NX - 1 );
If( Is Missing(colX2[i]), NX = NX - 1 );
If( Is Missing(colX3[i]), NX = NX - 1 );
If( Is Missing(colX4[i]), NX = NX - 1 );
show(NX);
If( Is Missing(colY1[i]), NY = NY - 1 );
If( Is Missing(colY2[i]), NY = NY - 1 );
If( Is Missing(colY3[i]), NY = NY - 1 );
If( Is Missing(colY4[i]), NY = NY - 1 );
show(NY);
x_vars = {}; // make empty list for x and y variables
y_vars = {};
X = colX[i];
X1 = colX1[i];
X2 = colX2[i];
X3 = colX3[i];
X4 = colX4[i];
Y = colY[i];
Y1 = colY1[i];
Y2 = colY2[i];
Y3 = colY3[i];
Y4 = colY4[i];
If( !Is Missing(colX[i]), Insert Into( x_vars, X ) );
If( !Is Missing(colX1[i]), Insert Into( x_vars, X1) );
If( !Is Missing(colX2[i]),Insert Into( x_vars, X2) );
If( !Is Missing(colX3[i]), Insert Into( x_vars, X3) );
If( !Is Missing(colX4[i]), Insert Into( x_vars, X4) );
If( !Is Missing(colY[i]), Insert Into( y_vars, Y) );
If( !Is Missing(colY1[i]), Insert Into( y_vars, Y1) );
If( !Is Missing(colY2[i]), Insert Into( y_vars, Y2) );
If( !Is Missing(colY3[i]), Insert Into( y_vars, Y3) );
If( !Is Missing(colY4[i]), Insert Into( y_vars, Y4) );
show(x_vars);
show(y_vars);
GB = Current Data Table() << Graph Builder(
Size( 621, 472 ),
Variables(
X(x_vars),
Y(y_vars)
),
// the for loops is used together with the NX and NY part from above
For( i = 1, i <= NX, i++,
For( j = 1, j <= NY , j++,
If( i == 1 & j == 1,
Elements(
Position( i, j ),
Points( X, Y, Legend( 67 ) ),
Smoother( X, Y, Legend( 68 ) )
),
Elements(
Position( i, j ),
Points( X, Y, Legend( 68 + (i - 1) * 5 + (j - 2) ) ),
Smoother( X, Y, Legend( 69 + (i - 1) * 5 + (j - 2) ) )
)
)
)
),
SendToReport(
Dispatch(
{},
"Graph",
ScaleBox,
{Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )}
)
)
);안녕하세요, 비어 있지 않은 변수를 감지하고 이를 아래 표시된 변수의 X( ) 및 Y( )에 추가하는 방식으로 스크립트를 작성하는 방법은 무엇입니까?
지금 내가 가지고 있는 것은 누락되지 않은 것을 감지하여 목록에 추가한 다음 해당 목록에서 아래에 표시된 변수에 추가하려고 시도하는 위에 표시됩니다. 계속하려면 어떻게 해야 합니까?
읽어 주셔서 감사합니다
Variables(
X(x_vars),
Y(y_vars)
),
안녕 @Dyan ,
다음 그래픽이 만들려는 그래픽입니까? 그렇다면 여기에 샘플 스크립트가 있습니다.

x_vars = "";
y_vars = "";
xlist = {X, X1, X2, X3, X4} = Eval List( {colX[i], colX1[i], colX2[i], colX3[i], colX4[i]} );
ylist = {Y, Y1, Y2, Y3, Y4} = Eval List( {colY[i], colY1[i], colY2[i], colY3[i], colY4[i]} );
For( x_i = 1, x_i <= N Items( xlist ), x_i++,
If( !Is Empty( xlist[x_i] ),
x_vars = x_vars || "X(" || Char( Eval Expr( xlist[x_i] ) ) || "),"
)
);
For( y_i = 1, y_i <= N Items( ylist ), y_i++,
If( !Is Empty( ylist[y_i] ),
y_vars = y_vars || "Y(" || Char( Eval Expr( ylist[y_i] ) ) || "),"
)
);
Show( x_vars );
Show( y_vars );
Eval(
Parse(
Eval Insert( "\[GB = Current Data Table() << Graph Builder(
Size( 621, 472 ),
Variables( ^x_vars^ ^y_vars^ ),
)
;]\" )
)
);
다음 토론 페이지는 유사한 질문을 참조합니다. https://community.jmp.com/t5/Discussions/JSL-Script-Graph-Builder-to-plot-all-columns-of-a-data-table/td-p/254038
아래 페이지에서도 표현에 대해 배울 수 있습니다. https://community.jmp.com/t5/JSL-Cookbook-Archived/Insert-one-expression-into-another-using-Eval-Insert-Eval-Expr/ta-p/48998
도움이 되길 바랍니다.