Hi,
You can read the window name, layer index and dataset name that been plotted like the following:
doc -e LP {
string WindowName = %H; // Get current processed graph window short name
int LayerIndex = page.active; // Get current layer index number
doc -e DY{
string DataPlotName = %C; // Get current dataset name
...
}
}
Then you can use conditions like if or switch to customize the curve base on the infos you got.
If you just want color and type to be different in each layer, you can use the following script:
doc -e LP{
layer -g; // group all plots in the layer, increment will be applied automatically
}
Or:
doc -e LP{
int Count = 2; // Begin at 2 because color#1 is black
doc -e DY{
set %C -c $(Count); // Set color
set %C -k $(Count-1); // Set symbol shape
Count++;
}
}
Hope this would help.
Zheng
OriginLab