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
 labtalk-plotting selected columns

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
vikas2014 Posted - 10/17/2014 : 10:48:05 AM
Origin Ver.6.0
Operating System: windows 7
hey i am pretty new in labtalk scripting. i have the following stuff:
two worksheets, each in XY format, let me name them "theory" and "experiment".
i do some normalisation for data in Y column in "experiment". so now i have XNorm instead of XY in "experiment". then i have to copy XNorm to CD columns (next to AB) in "theory" worksheet. then i plot XYXNorm together. i would love to put a template also for the outcome plot.

i fail in the stage of plotting. how do we plot selected columns using labtalk scripting?? (i need the flexibility of changing column names whenever i need, in the script i write)

also, how to load the ascii data into worksheet by script?
Thanks in advance.
1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 11/05/2014 : 1:54:57 PM
Given A,B,C,D where you want to plot B vs. A and D vs. C, you can use:

plotxy ([Theory]Sheet1!(1,2),[Theory]Sheet1!(3,4)) plot:=201;

Rather than use names, I used columns indexes: 1,2,3,4

But you don't need to copy your data at all since you could also use:
range raT = [Theory]Sheet1!(1,2);
range raE = [Experiment]Sheet1!(1,2);
plotxy ((raT),(raE)) plot:=200;

There are lots of options in the impAsc import X-Function, but at its simplest you can use:
dlgfile gr:=ASCII; // Browse for the file you want to import
newbook; // Create a new book (optional)
impasc; // Import the selected file

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