Problem in TH2 filling

Consider this code

{
    TH2I h("h", "h", 100, 0, 100, -1, -1, -1);
    cout << h.GetXaxis()->GetXmin() << endl;  // -> 0
    h.Fill(-1, "cut1", 0);
    cout << h.GetXaxis()->GetXmin() << endl;  // -> 0
    h.Fill(-1, "cut2", 0);
    cout << h.GetXaxis()->GetXmin() << endl;  // -> -100
}

can you explain me this behaviour? I want a fixed x axis and a variable y axis, but ROOT change the x axis!

Hi,

The problem is that the x axis is rebid as well when you are filling with underflow or overflow. This is because the bit to rebin an histogram when filled with underflow or overflow is not specific to the axis but to the all histogram. This is not correct and it should be fixed. I will try to do it for the next release.
I have opened a Savannah bug for this,
savannah.cern.ch/bugs/index.php?89628

Lorenzo