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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 How to toggle existing error bars on/off
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

tom3m

USA
27 Posts

Posted - 02/27/2002 :  3:08:26 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I have a script that creates a plot of some data including averages (Y values) and standard deviations (Y error bars) versus a parameter. I use the command

wks.col$(mm).type=3;

to set column number mm to be of type Y error to get the error bars (the data columns are organized as |X|Y|Yerr|X|Y|Yerr...|X|Y|Yerr|). I would like to write a simple script to toggle the error bars on and off. I can do this manually for each error bar in the layer by using the error bar control tab from "plot details" by unchecking the plus and minus direction checkboxes, but I cannot find a labtalk command to do this. "Set" seems to only be for setting a certain column to be error bars for a given data set.

I suppose one way would be to make a dummy column full of zeros and then use "Set" to assign it to be the error bars instead of the column that I initially used. It seems like a major contortion for something as simple as toggling error bars on/off.

I tried searching the manual and the Origin forums but could not find anything.

Please help!

Thanks!

Mike Buess

USA
3037 Posts

Posted - 02/27/2002 :  3:41:46 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Have you tried hiding them with Set?

set dataset -s 0;

I don't know if that works for error bars, but it's worth trying.

Mike Buess
Origin WebRing Member
Go to Top of Page

tom3m

USA
27 Posts

Posted - 02/27/2002 :  4:26:27 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
It does work! Thank you very much. It is one of those put 2+2 together things, I guess. I didn't really think of the error bar columns as a "data set", but Origin does think of it that way.
Go to Top of Page

tom3m

USA
27 Posts

Posted - 03/01/2002 :  11:54:00 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I should note that I found it is required that the layer in which the error bars appear be the active layer when you issue the command to unset them. This might be obvious to the veterans but it was not obvious to me. I now have a nice little script running.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000