Hi, Tom.
To select two columns that are not ajacent, you can use the wks.colSel(ColumnIndex). This command adds a column to the current selection. For example, you can use the following code to select Column 2 and Column 17:
wks.colSel(2);
wks.colSel(17);
If the current column selection is fine, ploting with the command
worksheet -p 201
should not cause the dialog to pop up. Please try this again.
Here is an example to perform the savitsky-golay smoothing. It assumes that the names of the X column, data column and result column are Index, Data, and Result.
curve.data$=%h_Data;
curve.x$=%h_Index;
curve.result$=%h_Result;
curve.polydeg=3;
curve.smoothleftpts = 5;
curve.smoothrightpts = 5;
curve.smoothpts =20;
curve.SGSmooth();
I think this short script can be able to help.
In your case, I don't think plotting the original data and removing from the graph is necessary. Since we can do the smoothing on the worksheet, I think we can plot the smooth result only.
If you have any more problems, please share with us. We will be more than happy to help. :)
Deanna
OriginLab GZ Office