I have a TH2 with the bit KCanRebin set. I add 2 values, one high and one low (on Y). I can see both of them as long as I don’t set a logarithmic scale on Y.
I don’t understand why the lowest part of Y axis is not displayed.
Here is the code:
root [0] TH2F *h2 = new TH2F("h", "h", 21, 0, 21, 100, 0, 1000)
root [1] h2->SetBit(TH2::kCanRebin);
root [2] h2->Fill(8, 1000)
(Int_t)1182
root [3] h2->Fill(10, 10)
(Int_t)34
root [4] h2->Draw("colz")
<TCanvas::MakeDefCanvas>: created default TCanvas with name c1
root [5] gPad->SetLogy()
Do you have an explanation ?
Sorry if it is trivial…
Your histogram starts at zero along Y. Log of zero is not defined. In such a case the minimum is set to 3 decades below the maximum (if the maximum is positive). The bin you added is below the 3 decades that’s why it goes away. If you set the minimum to something just above zero, then the bin is still visible in log scale.