T O P I C R E V I E W |
scs_emi |
Posted - 04/14/2016 : 05:21:41 AM 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?
Thank you
itelly |
1 L A T E S T R E P L I E S (Newest First) |
SeanMao |
Posted - 04/15/2016 : 02:01:35 AM Hi,
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.
Hope I make this clear to you.
Regards!
Sean
OriginLab Tech.
|
|
|