Author |
Topic  |
|
benlyons
UK
Posts |
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. |
|
VincentLiu
China
Posts |
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 |
 |
|
benlyons
UK
Posts |
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; |
 |
|
|
Topic  |
|
|
|