JMP 社區您好,
我想突出顯示故障箱“2”的每個 X 和 Y 坐標中的兩個數據點。 我嘗試編寫jsl代碼,但結果不正確。
下面的代碼突出顯示了故障箱“2”的 X 和 Y 坐標中的兩個以上數據點。 有什麼建議麼?

這是代碼
Names Default To Here( 1 );
dtt = Data Table( "failures" );
dt = Data Table( "Summary Bins" );
//Clear values
dt:Highlight[1 :: N Rows( dt )] = "";
//define list for storing +/-2 X and Y coord in the list
xList = [];
yList = [];
//get X and Y coord of the failing dies
fail_xcoord = dtt:X coord << get values;
fail_ycoord = dtt:Y coord << get values;
// Add and subtract 2 from X and Y using a loop
For( j = 1, j <= N Rows( dtt ), j++,
For( i = -2, i <= 2, i++,
newX = dtt:X coord[j] + i;
newY = dtt:Y coord[j] + i;
If( newX != dtt:X coord[j],
Insert Into( xList, newX )
);
If( newY != dtt:Y coord[j],
Insert Into( yList, newY )
);
)
);
//Loop to highlight 2 dies
dt << Begin Data Update;
For( i = 1, i <= N Rows( dt ), i++,
If( Contains( xlist, dt:X coord[i] ) & Contains( fail_ycoord, dt:Y coord[i] ),
dt:Highlight[i] = "1";
);
If( Contains( ylist, dt:Y coord[i] ) & Contains( fail_xcoord, dt:X coord[i] ),
dt:Highlight[i] = "1";
);
);
dt << End Data Update;
dt << select where( :Highlight == "1" & :Bins == "1" );我只想突出顯示每個失敗模具的 2 個數據點,它應該看起來像這樣

謝謝,
傑基