I have an old code in Labtalk (written about 2000) that is supposed to draw a graph in red color. I use Origin 2015. Unfortunately the code doesn`t run properly. ( It did back in 2000, though)
... %M=Time; %N= aX1Y10; %S=Data_%N; set %S -x Data_%M; set %S -c 2; ...
The problem occurs in this line where my LabTalk Script Window reports an #Command Error!
set %S -x Data_%M;
When I look in the manual of Labtalk they show the set -x - command, but the command is written in a lighter color. Does this mean that there was a change made in this command within the last 15 years? Is there an other command that I would be supposed to use today?
I tried your code, it works on my side in Origin 2015. Here is how I understand your code:
You have a workbook named "Data", you have one column with short name "aX1Y10" and another column with short name "Time". Previously, you have plotted column "Time" with respect to some X column and now you want to switch to use column "aX1Y10" to replace the X of current graph.
The command set %S -x Data_%M will set column %S (aX1Y10) as the X column of column %M (Time). However, since %S is already regarded as X column and when you use set %S -c 2 to set the color it will not work.
You will need to change your last command line to:
set %C -c 2; // set current active plot as red or set Data_%M -c 2; // set specified plot as red.