Histogram disappears when zooming

ROOT Version :6.12/04
Platform: f29
Compiler: gcc version 8.3.1 20190223 (Red Hat 8.3.1-2) (GCC)

Dear co-rooters,

I am facing a rather bizarre issue :

I have a canvas which I divide in 2 pads using

TCanvas *canvas = new TCanvas("canvas", "HPGe", 500, 500);
canvas->Divide(1, 2);

In the bottom pad I draw two histograms, the second of which is defined through

TH1D *histo_rms = new TH1D("histo_rms", "Derivative RMS", 1, 0, histo_1st_derivative->GetBinCenter(points));
histo_rms->SetBinContent(1, -rms_fraction*rms);

The problem is that when I zoom in the x-axis of the bottom pad through the mouse, the histo_rms histogram disappears, but when I unzoom it comes back again!

Any idea on what might be wrong and how to fix it?

A root file that contains the canvas can be found https://cernbox.cern.ch/index.php/s/3WZTaw3lE7WJHv

It seems that it was the binning.
When creating the histogram using 1000 bins instead of 1

TH1D *histo_rms = new TH1D("histo_rms", "Derivative RMS", 1000, 0, histo_1st_derivative->GetBinCenter(points));

the histogram doesn’t disappear when zooming!

Although the issue is solved, any idea on why it’s happening?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.