TGraphErrors Evaluate error?

Dear Experts,

 Have got a TGraphErrors, for which I may call Eval( x ) to get

the y-axis value for some x.
The question is, can I do something similar to get an estimate
of the error for some x ? I can draw smoothed area using the Point’s
error bars, so I guess that what I am looking for is available somewhere.

  All the best,
1 Like

The smoothed area is drawn using the option C on a graph passing trough all the end points of the errors bar.
That’s not at all an evaluation of the error at any x position. See limitations here:

Dear Couet,

Is there any function that return error of an interpolation point getting from a TGraphErrors?

For instance:

I have a TGraphErrors gr1;
I want to calculate value y corresponding to a point x, I do y = gr1->Eval(x);
Now I want to know error of y (dy).

Thank you very much,

Eval() does a linear interpolation between two graph point n and n+1 such as
x(n) < x < x(n+1). That can be done for the values. But how would you like to do it for the errors as the point x is not part of the data point belonging to the graph ?

I would like to compare two sets of data. Each of them has different data points, namely {xi,yi} and {xj,yj}. It is noted that xi is not equal to xj. Therefore in order to compared, I need to use Eval, that is the interpolation. Here I also need to estimate the error.

For example:
Set 1:
1 - 1
3 - 3
5 - 5
7 - 7
set 2:
2 - 2
4 - 5
6 - 6.2
8 - 8
To compare these two sets, I may use set_1->Eval(2) to get the y value of 2, then compare it to the corresponding y value in set_2.

On the other word, I need the uncertainty of an interpolation value.


Yes I understand what you want. The function corresponding to Eval does not exist for Errors.

1 Like