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
 Assigning Numbers to TicksByData$

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
cdrozdowski111 Posted - 12/10/2012 : 07:22:37 AM
OriginPro 9.0.0 (Student Version), Win7 64-bit, running in VMware Fusion 5.0.2

If I have a series of numbers that I want to assign to TicksByData$ property of a TopX layer in an LT script, can I do it and how? I'd really rather not have to get the numbers from a worksheet.

Series of numbers: 677 682 692 695 701 704 716 717 726 727 729

Example code to add TopX layer to active graph:

layadd type:=TopX activate:=1 userdef:=1 linkto:=1 xaxis:=straight yaxis:=0 bottom:=0 left:=0 top:=1 right:=0;
range ll = !;
ll.x2.TicksByData$ = <series of numbers from above>;
1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 12/10/2012 : 1:01:22 PM
Unfortunately, TicksByData does not work with Loose Datasets so you cannot do something like:
Dataset dsTBD = {677, 682, 692, 695, 701, 704, 716, 717, 726, 727, 729};
and use that by
ll.x2.TicksByData$ = dsTBD;

So you will need to add a column to your worksheet and fill it with those values. Then you can that column as your ticks:
range raw = [Book1]Sheet1!;
raw.AddCol(TBD);
range raTBD = [Book1]Sheet1!TBD;
raTBD = {677, 682, 692, 695, 701, 704, 716, 717, 726, 727, 729};
layadd type:=TopX activate:=1 userdef:=1 linkto:=1 xaxis:=straight yaxis:=0 bottom:=0 left:=0 top:=1 right:=0;
range ll = !;
ll.x2.TicksByData$ = raTBD;

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