X-axis value

I am trying to find the x-axis value, bin number, for the maximum of some histogram, i.e. what do I do if I want to find the bin number that corresponds to a y-axis value that I know?

Use TH1::GetMaximumBin.
This returns the bin number in X corresponding to the maximum value in Y

Note that for a given value in Y, you may have more than one value in X.
If this is your problem, you must loop yourself on the bin contents
and take your own decision.


Thanks alot Rene, that worked.