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
 Origin Forum
 Error bars through symbols

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
aeolian1 Posted - 02/23/2007 : 05:13:50 AM
Origin Version (Select Help-->About Origin): 6.1
Operating System: Windows NT

Hello,

I just started using Labtalk, and am wondering whether I use Labtalk to set the error bars always to pass through symbols. I must plot hundreds of graphs, and would prefer to avoid having to change this manually.

Also, is there perhaps an *.ini file for which I can set this feature permanently (even when I'm not using Labtalk)?

Thank you very much!
6   L A T E S T    R E P L I E S    (Newest First)
aeolian1 Posted - 02/26/2007 : 09:01:00 AM
Dear Mike,

I replaced the code I was using with the 3 last lines of the code you suggested, and it now works like a charm! Thank you very much!

P.S. FYI *only*: I should have memtioned earlier that my previous code was

worksheet -p 201 ORIGINwgooderrorbars;
layer -i %K; // plot error dataset
set %K -or %J; // associate it with fit data

Perhaps this explains the source of the problem...perhaps I didn't understand how to "select" Y and Yerr columns. I did notice that with my malfunctional code, if I looked inside the plotting worksheet, only the Y column was highlighted, and not the Yerr column as well. BTW, the template was located in the correct directory.
Mike Buess Posted - 02/23/2007 : 2:03:53 PM
I was about to suggest you use a theme but then I noticed you're using Origin 6.1. Besides, templates are the standard and time-honored way to handle such graph settings. There is no LabTalk or Origin C involved and it should be as simple as outlined in my original post. (I've checked that it also works in Origin 6.1.) Y and yEr data plotted in a template will have the same format as those with which the template was saved. If you plot with worksheet -p the Y and yEr wks columns must be designated as such and selected in the wks. The plotID (scatter=201) must be included on the command line. Also, the template must be saved in the program directory. I can't think of any other conditions for making it work.

...Here's an alternate plotting method that should give results that are identical to those of worksheet -p.

%W=%H; // save wks name
win -t P ORIGINwgooderrorbars; // open graph template
lay -i201 %W_B; // plot col B as scatter
lay -i %W_C; // plot col C (error bars)

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 02/23/2007 2:15:34 PM
aeolian1 Posted - 02/23/2007 : 1:04:33 PM
Dear Mike,

Thank you very much for your further suggestions. I applied them both: I remade the template (just to be sure), and also changed the worksheet command per your comment.

The results are strange: if I include the "201", the plot contains symbols, but the error bars don't go through the symbols (which was the original problem). On the other hand, leaving the "201" out produces the same result as as after my first attempt, namely "through-going" error bars without symbols (which probably means that the two templates I tried were in fact identical).

Is there perhaps an alternate way of solving this...? It's strange that you were successful - or, perhaps not surprising at all, given that this was my first crack at Labtalk programming. I wonder if something else which I don't know enough about to mention produces our disparate results - but what?
Mike Buess Posted - 02/23/2007 : 12:01:47 PM
I'm not sure what to suggest because it works fine for me. Just two clarifications: (1) Select Y and yEr columns before plotting. (2) Plot command should be worksheet -p 201 ORIGINwgooderrorbars.

Mike Buess
Origin WebRing Member
aeolian1 Posted - 02/23/2007 : 11:40:05 AM
Dear Mike,

Thank you for your answer. I must be missing something, as I can't get your solution to work. I did the following:

1. Made a fake data set (incl. error bars) and plotted it using the Plot:Scatter command. The symbols were the default ones (black squares of size 8).

2. Adjusted the error bars so that they passed through the symbols.

3. Saved the template (as ORIGINwgooderrorbars.OTP).

4. In Labtalk, I had previously been using the command

worksheet -p 201 scatter; to plot my data. I changed this to

worksheet -p ORIGINwgooderrorbars;

Unfortunately, the plots produced using this command don't have any points; they now contain only the error bars. The error bars are missing a single central pixel, so it's clear that they "mean well" in terms of passing through the center. Where have all my symbols gone (long time passing... :) ), and how can I get them back while retaining the nice center-crossing error bars? Did I do something wrong in saving the template, perhaps?

Thank you very much again for your advice!
Mike Buess Posted - 02/23/2007 : 10:28:33 AM
Set the error bars like you want then right-click on the graph window's title bar and select Save Template. That will apply your settings to all future graphs made with that template.

Mike Buess
Origin WebRing Member

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