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
 X error bars on wrong dataset

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
benlyons Posted - 12/02/2008 : 11:50:08 AM
Origin 7 SR1
Operating System: Windows XP

I'm having a problem writing a LabTalk script to plot a variety of graphs with (error bars) from the same worksheet. I've been looking through LabTalk help and this forum for a long time, but can't seem to get the script to work...

I have a worksheet 'Data' with 20 columns:

"C Cerr EQE EQEerr P Perr WPE WPEerr Lum Lumerr LumE LumEerr DevE DevEerr Brt Brterr CIEx CIExerr CIEy CIEyerr"

Columns with suffix 'err' are set as error columns. C is set as an X column. All others are set as Y columns.

I'm trying to write a script which plots columns against column C, but am having trouble getting the error bars right. For example, having already opened a graph window, I execute:

layer -i Data_Brt Data_Cerr Data_Brterr;

This creates the following layer contents:
1. Data: C(X), Brt(Y)
2. Data: C(X), EQE(Y), Cerr(xEr)
3. Data: C(X), Brt(Y), Brt(yEr)

1 and 3 are OK, but I can't for the life of me figure out why it's plotting the X-error bars against a different column. In the resulting graph, the error bars don't touch the datapoints!

I have similar problems with other parts of the script. If someone can spot what I'm doing wrong in this example, I'd be very happy.
2   L A T E S T    R E P L I E S    (Newest First)
benlyons Posted - 01/05/2009 : 11:50:53 AM
The guys at OriginLab solved my problem after I sent them my script. In case anyone else is having similar difficulties, here's the solution:

The "Set -ox" LabTalk command does a trick to fix the script. Here, how you can use the command to specify the X Error dataset associated with a specific Y dataset:

layer -i <XErr_Dataset>; //Plot XErr ds under default column order
set <XErr_Dataset>; -ox <Y_Dataset>; //Reassociate XErr ds with specific Y ds

So in my original post, the script needs to have a line added:

layer -i Data_Brt Data_Cerr Data_Brterr;
set Data_Cerr -ox Data_Brt;
VincentLiu Posted - 12/11/2008 : 03:46:52 AM
Hi Benjamin,

Could you send your codes and .opj file to us through


http://www.originlab.com/www/company/qform.aspx?s=1&


Then we can try to solve the problem as soon as possible.

Best regards,
Vincent Liu
OriginLab Technical Services

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