Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'creating spcialization of ErrorListPlot' topicStudent Support Forum > General > "creating spcialization of ErrorListPlot"

Help | Reply To Topic
Author Comment/Response
03/04/12 5:20pm

This has already been bothering me for too long. In physics I have to keep track of the uncertainties of values all the time, so what I did is create a new header called "Uncertain" which is basically a list of two values Uncertain[x,dx] meaning (x \pm dx).

This works fine to some extend. Eg. I have overwritten Apply so that the errors are calculated correctly.

There are two problems though. The first one might be unfixable:
1. f_@@{x_,y_} can be overwritten, but f_[x_,y_] for arbitrary f can not be overwritten
2. ErrorListPlot behaves crazy. I want to bring my data into a Form ErrorListPlot can understand automatically but the following pattern does not work for some reason....
ErrorListPlot[{x__Uncertain}, opt___] :=
ErrorListPlot[ToErrorList[{x}], opt]

It works fine if I use the same line to define a new function. Is there any way to give my pattern preference or similar, so that it will be used?

URL: ,
Help | Reply To Topic