The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 set - x command

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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.


The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000