Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1d12b60

Browse filesBrowse files
committed
add test for hexbin linear
1 parent a334a6c commit 1d12b60
Copy full SHA for 1d12b60

File tree

Expand file treeCollapse file tree

2 files changed

+13
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+13
-0
lines changed
Loading

‎lib/matplotlib/tests/test_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+13Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.