How to acces bins of Y-axis?

Hi,

I faced a problem while trying to access the bins of the y-axis of a TH2D.
I Try to get it via

But all I get is the Error:
Error in TArrayD::At: index 0 out of bounds (size: 0, this: 0x31c7028)

If I do this with the x-axis, everything works fine.

What am I doing wrong here?
Also if I type

delivers me the correct result of 106 bins. But if I type

it returns 0;

Thanks in advance

Hans Maulwurf

Arrays of bins’ edges exist only for “variable bin size” histograms.
In any case, you can use something like this:
histo->GetYaxis()->GetBinLowEdge(bin)
histo->GetYaxis()->GetBinCenter(bin)
histo->GetYaxis()->GetBinUpEdge(bin)
histo->GetYaxis()->GetBinWidth(bin)

Thanks! Thats It.