Skip to content

Commit 99a5fe0

Browse files
committed
squash! [hist] Ensure that maximum of a distribution is visible in histograms.
1 parent 1a81a93 commit 99a5fe0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

hist/hist/src/TH1.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,7 @@ Int_t TH1::BufferEmpty(Int_t action)
14301430
"inconsistency found by power-of-2 autobin algorithm: fallback to standard method");
14311431
}
14321432
if (rc < 0)
1433-
THLimitsFinder::GetLimitsFinder()->FindGoodLimits(this, xmin, xmax + 0.01 * (xmax - xmin));
1433+
THLimitsFinder::GetLimitsFinder()->FindGoodLimits(this, xmin, xmax);
14341434
} else {
14351435
fBuffer = nullptr;
14361436
Int_t keep = fBufferSize; fBufferSize = 0;

hist/hist/src/THLimitsFinder.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ void THLimitsFinder::OptimizeLimits(Int_t nbins, Int_t &newbins, Double_t &xmin,
384384
xmax = 1;
385385
} else {
386386
xmin = std::min(binlow, xmin);
387-
xmax = std::max(binhigh, xmax);
387+
xmax = std::max(binhigh, xmax + 0.01 * (xmax - xmin));
388388
}
389389
if (isInteger) {
390390
Long64_t ixmin = Long64_t(xmin);

0 commit comments

Comments
 (0)