About bin errors in a histogram. Error in x or in y?

Hello!

I want to know if is possible to assign errors in y coordinate. For example, if I want to fit a function, but the data of the bins have errors but along the Y axis. Is possible to do this with a histogram? I think that when you make SetBinError, you are giving an error to the bin but along the X-Axis.

Or is needed to use TGraph in these situations instead of histograms?

Hope you understand me!

Thanks!

Bye!

Hi,

the error in an histogram (from GetBinError) is only around the y axis, and is typically (in case of counts) the square root of the bin content.

For the error in x (and y) you can to use the TGraphErrors, and in case of asymmetric errors the TGraphAsymmErrors,

Best Regards

Lorenzo