Hi Aragues,
At the end of your function body, add the following codes:
DataPlot dp = grlay.DataPlots(nPlot);
Tree tr;
tr = dp.Curve;
tr.Pattern.Border.Color.nVal = 17;
dp.Curve = tr;
Note that 17 = index of White Color if your color palette (see Format -> Color Palette dialog) is default.
Leo
OriginLab Corp.