Skip to content
This repository was archived by the owner on Jan 27, 2023. It is now read-only.

Commit efc317c

Browse files
committed
correctly 'show' histograms with non-uniform bin widths
1 parent 8554ae3 commit efc317c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

uproot_methods/classes/TH1.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ def interval(self, index):
124124
return (float("-inf"), low)
125125
elif index == len(self) - 1:
126126
return (high, float("inf"))
127+
elif len(self._fXaxis._fXbins) == self._fXaxis._fNbins + 1:
128+
return (self._fXaxis._fXbins[index - 1], self._fXaxis._fXbins[index])
127129
else:
128130
norm = (high - low) / self._fXaxis._fNbins
129131
return (index - 1)*norm + low, index*norm + low

uproot_methods/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
import re
3232

33-
__version__ = "0.1.0"
33+
__version__ = "0.1.1"
3434
version = __version__
3535
version_info = tuple(re.split(r"[-\.]", __version__))
3636

0 commit comments

Comments
 (0)