Please activate a worksheet with xyyy data, and try the script:
int nn = wks.ncols;
plotxy (1,2:$(nn));
layer -gu; // ungroup plots
layer -c; // count the number of plots and save to count
for (int i = 1; i <= count; i++)
{
range rr = $(i);
set rr -c $(i);
set rr -k $(i);
}
James