8000 Merge pull request #21339 from j-bowhay/test-hexbin-linear · matplotlib/matplotlib@8e177ba · GitHub
[go: up one dir, main page]

Skip to content

Commit 8e177ba

Browse files
authored
Merge pull request #21339 from j-bowhay/test-hexbin-linear
Added linear scaling test to Hexbin marginals
2 parents ec491a5 + 1d12b60 commit 8e177ba

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
Loading

lib/matplotlib/tests/test_axes.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,19 @@ def test_hexbin_log():
868868
plt.colorbar(h)
869869

870870

871+
@image_comparison(["hexbin_linear.png"], style="mpl20", remove_text=True)
872+
def test_hexbin_linear():
873+
# Issue #21165
874+
np.random.seed(19680801)
875+
n = 100000
876+
x = np.random.standard_normal(n)
877+
y = 2.0 + 3.0 * x + 4.0 * np.random.standard_normal(n)
878+
879+
fig, ax = plt.subplots()
880+
ax.hexbin(x, y, gridsize=(10, 5), marginals=True,
881+
reduce_C_function=np.sum)
882+
883+
871884
def test_hexbin_log_clim():
872885
x, y = np.arange(200).reshape((2, 100))
873886
fig, ax = plt.subplots()

0 commit comments

Comments
 (0)
0