comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Error Bar Thoughts
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Error Bar Thoughts [message #74769] Wed, 02 February 2011 09:50 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

Since I am parallelized in uncertainty as I look at my
growing list of things to do, I've decided to blow
off some steam by doing something fun. I've decided
to add error bars to my cgPlot routine. (Fun *and*
it knocks an item off my list!)

But, here is my dilemma. I don't typically use error
bars. :-(

So here is my question. How would people (presumably
those people who DO use error bars, please!) want
to specify the location of the high and low locations
of the bar? As an offset from the data point?

data = 5
errlow = 0.1
errhigh = 0.2

As a data value itself?

data = 5
errlow = 4.9
errhigh = 5.2

What is the usual thing? Do I need an ERROFFSET flag to
indicate one or the other?

Please reply soon. I have nothing else to do. :-(

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Error Bar Thoughts [message #74826 is a reply to message #74769] Thu, 03 February 2011 04:19 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
I fall into the actual value camp. I've had lots of times when I've wanted to plot an error bar without a central value, and it feels far more forced to try to come up with a central value to +/- from there than to calculate the actual values for the end points when you have an uncertainty.

But I heartily agree that you should just pick one and let the user do what they need in order to get it in the right format. It's not difficult either way.

-Jeremy.
Re: Error Bar Thoughts [message #74841 is a reply to message #74769] Wed, 02 February 2011 16:48 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Gray wrote:
> On Feb 2, 3:14 pm, David Fanning <n...@dfanning.com> wrote:
>> Matt writes:
>>> I second this motion. And I'd prefer actual values rather than
>>> offsets, but it's an easy enough operation to be able to figure out.
>> Yeah, actual data makes sense to me, too. And it means
>> I don't have to fool around too much with philosophical
>> discussions about whether up is down or visa versa. Plus,
>> it's easy enough it might even happen in the next hour
>> or two. :-)
>>
>> Cheers,
>>
>> David
>>
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
> It's funny, offsets make more sense to me because that's how results
> are usually quoted: 1.05+0.02-0.06

seconded.

Using actual data values as input means the user will pretty much *always* have to convert the values since I have never
(well, very very rarely) seen error estimates reported as anything other than +/- offset values. But I think different
fields will have their favourite way so whatever you choose you'll get complaints. :o)

Apart from that, if the user passes the offset in as, e.g., a 2-element array for each data point then, if the position

is important the first one is the +ve delta, the second one is the -ve delta. Just plot datavalue+abs(errest[0]) and
datavalue-abs(errest[1]).

If the position isn't considered indicative of the value being a +ve or -ve delta, then the user is responsible for
supplying the sign of the error and just plot from value to value, i.e. datavalue+errest[0] to datavalue+errest[1]

I prefer the latter since relying on data position makes me uneasy (I'll forget the "rule").

cheers,

paulv
Re: Error Bar Thoughts [message #74846 is a reply to message #74769] Wed, 02 February 2011 15:16 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Wayne Landsman writes:

>
> On Wednesday, February 2, 2011 12:50:24 PM UTC-5, David Fanning wrote:
>
>> to specify the location of the high and low locations
>> of the bar? As an offset from the data point?
>
> For what it is worth, the ITTVIS supplied procedure PLOTERR specifies the error as an offset from the data point, but the ITTVIS supplied ERRPLOT wants the low and high values. In my own work, errors are nearly always suplied as a offset (e.g. Poisson errors are a square root of the counts). Note that users often want to display X along with Y error bars.
>
> The two most difficult parts of writing my own PLOTERROR ( http://idlastro.gsfc.nasa.gov/ftp/pro/plot/ploterror.pro ) were handling the X/YLOG and NSUM keywords to PLOT. You don't want the entire logarithmic plot to abort because one of the error bars extends to negative numbers, and you want to appropriately reduce the size of the error bars when summing data together. ---Wane

OK, tell me again why I am re-inventing this wheel!?
Or, the Legend wheel, for that matter.

It seems to me that if there are good routines out
there like this we ought be be able to just make
them work with Coyote Graphics routines. It's pretty
simple, really.

It seems to me I should be spending my time inventing
a Coyote Seal of Approval that we could attach to
good routines that handled colors correctly and could
be used in resizeable graphics windows. Then everyone
could be working on this and I could get back to doing
what I do best: drinking lattes. Maybe I could make
a web page with pointers to these routines so they
are easy to find.

Just a thought. :-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Error Bar Thoughts [message #74854 is a reply to message #74769] Wed, 02 February 2011 13:26 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Wednesday, February 2, 2011 12:50:24 PM UTC-5, David Fanning wrote:

> to specify the location of the high and low locations
> of the bar? As an offset from the data point?

For what it is worth, the ITTVIS supplied procedure PLOTERR specifies the error as an offset from the data point, but the ITTVIS supplied ERRPLOT wants the low and high values. In my own work, errors are nearly always suplied as a offset (e.g. Poisson errors are a square root of the counts). Note that users often want to display X along with Y error bars.

The two most difficult parts of writing my own PLOTERROR ( http://idlastro.gsfc.nasa.gov/ftp/pro/plot/ploterror.pro ) were handling the X/YLOG and NSUM keywords to PLOT. You don't want the entire logarithmic plot to abort because one of the error bars extends to negative numbers, and you want to appropriately reduce the size of the error bars when summing data together. ---Wane
Re: Error Bar Thoughts [message #74855 is a reply to message #74769] Wed, 02 February 2011 12:32 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gray writes:

> It's funny, offsets make more sense to me because that's how results
> are usually quoted: 1.05+0.02-0.06

Another advantage of making the errors actual values, though,
is that it increases the change that the length of the
data vectors and the length of the error vectors will match.
Always a consideration. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Error Bar Thoughts [message #74857 is a reply to message #74769] Wed, 02 February 2011 12:22 Go to previous message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On Feb 2, 3:14 pm, David Fanning <n...@dfanning.com> wrote:
> Matt writes:
>> I second this motion.  And I'd prefer actual values rather than
>> offsets, but it's an easy enough operation to be able to figure out.
>
> Yeah, actual data makes sense to me, too. And it means
> I don't have to fool around too much with philosophical
> discussions about whether up is down or visa versa. Plus,
> it's easy enough it might even happen in the next hour
> or two. :-)
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

It's funny, offsets make more sense to me because that's how results
are usually quoted: 1.05+0.02-0.06
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL 8 image function
Next Topic: Re: Coyote Graphics Update, Wed 2 Feb

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 20:49:24 PDT 2025

Total time taken to generate the page: 0.71845 seconds