Suppose you have a worksheet called "data1" where the columns are organized in this fashion:
A(X1) B(Y1) C(X2) D(Y2) E(X3) F(Y3)
To plot the 3 Y columns into a 3-layer graph called "Graph1", the following script (or something similar) could be used:
layerNum=1; // variable to hold layer number
loop(ii,1,data1!wks.ncols)
{
if(mod(ii,2)==0)
{
win -a data1; // activate data1
wo -s ii 0 ii 0; // select Y column
%A=%C; // assign dataset name of Y column to %A
win -a graph1; // activate graph1
page.active=layerNum; // activate layer
layer.include(%A,200); // plot selected Y column
layer -a; // rescale layer
layerNum++; // increment layer number variable
}
};
Hope that helps!
-rtoomey