Details
-
Bug
-
Status: Closed (View Workflow)
-
High
-
Resolution: Fixed
-
6.20/02
-
None
-
any
Description
Dear root experts,
it seems like the logX functionality is no longer working for histograms with errors.
With ROOT version 6.18/04 the minimal example code below works as expected, but in version 6.20/02 the histogram content is not displayed properly.
However, the logX still works for histograms without errors (in case no Sumw2 is called or errors are set to zero manually).
Thanks and cheers,
Mario
void logxtest() |
{
|
const int nBins = 100; |
TH1F* hist = new TH1F("hist", "", nBins, 0.5, nBins+0.5); |
hist->Sumw2(); // without Sumw2 it works fine |
for(int i = 1; i <= nBins; i++) hist->Fill(i); |
TCanvas* canv = new TCanvas("canv", ""); |
canv->Divide(1, 2); |
canv->cd(1); |
hist->Draw();
|
gPad->SetLogx();
|
canv->cd(2); |
hist->Draw();
|
}
|