Question about 2D histogram

Is there a function for 2D histogram that can fit the highest possibility bin of y axis corresponding to each bin of x axis? Thanks in advance.


From Lorenzo:
Hi Fufang,

I am not sure I have understood your question. Do you want a method of the 2D histogram class that can return the Y bins with the maximum bin content for each X bin ?
Please elaborate better your questions, maybe given some examples


Hi Lorenzo,
Thanks for your reply.
Yes, that is exactly what I am trying to find. For example, TProfile gives the average y value for each X bin, but I am looking for the value with highest possibility instead.


May be this: … 6f1f9d087c

Thanks, but I think “GetMaximumBin()” can only give the y bin with maximum possibility for each x bin, and is there a function that can directly connect and fit all of these y bins corresponding to x bins and gives error bars?