10000 Simplify code for vmin/vmax & bins='log' in hexbin · matplotlib/matplotlib@d050f58 · GitHub
[go: up one dir, main page]

Skip to content

Commit d050f58

Browse files
committed
Simplify code for vmin/vmax & bins='log' in hexbin
1 parent a8908a9 commit d050f58

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4800,7 +4800,7 @@ def reduce_C_function(C: array) -> float
48004800
f"can be supplied, ignoring bins={bins}")
48014801
else:
48024802
norm = mcolors.LogNorm(vmin=vmin, vmax=vmax)
4803-
vmin, vmax = None, None
4803+
vmin = vmax = None
48044804
bins = None
48054805

48064806
if isinstance(norm, mcolors.LogNorm):

lib/matplotlib/tests/test_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ def test_hexbin_log():
786786

787787

788788
def test_hexbin_log_clim():
789-
x, y = (np.arange(200) / 200).reshape((2, 100))
789+
x, y = np.arange(200).reshape((2, 100))
790790
fig, ax = plt.subplots()
791791
h = ax.hexbin(x, y, bins='log', vmin=2, vmax=100)
792792
assert h.get_clim() == (2, 100)

0 commit comments

Comments
 (0)
0