Skip to content

Commit 72ab6ac

Browse files
committed
Don't add 1 to all hexbin data when using log norm
1 parent ad4585b commit 72ab6ac

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
hexbin with a log norm
2+
----------------------
3+
`~.axes.Axes.hexbin` no longer (incorrectly) adds 1 to every bin value if a
4+
log norm is being used.

lib/matplotlib/axes/_axes.py

-5
Original file line numberDiff line numberDiff line change
@@ -4803,11 +4803,6 @@ def reduce_C_function(C: array) -> float
48034803
vmin = vmax = None
48044804
bins = None
48054805

4806-
if isinstance(norm, mcolors.LogNorm):
4807-
if (accum == 0).any():
4808-
# make sure we have no zeros
4809-
accum += 1
4810-
48114806
# autoscale the norm with current accum values if it hasn't
48124807
# been set
48134808
if norm is not None:

0 commit comments

Comments
 (0)