Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 166d776 commit 1412149Copy full SHA for 1412149
src/napari_matplotlib/histogram.py
@@ -72,7 +72,7 @@ def draw(self) -> None:
72
# whole cube into memory.
73
if data.dtype.kind in {"i", "u"}:
74
# Make sure integer data types have integer sized bins
75
- step = 1 + (np.max(data) - np.min(data)) // 100
+ step = 1 + abs(np.max(data) - np.min(data)) // 100
76
bins = np.arange(np.min(data), np.max(data) + step, step)
77
else:
78
bins = np.linspace(np.min(data), np.max(data), 100)
0 commit comments