Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eaca7b2

Browse files
committed
Add test for empty hexbin with log scaling.
1 parent fa79e3d commit eaca7b2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,14 @@ def test_hexbin_empty():
901901
ax.hexbin([], [])
902902

903903

904+
@image_comparison(['hexbin_empty.png'], remove_text=True)
905+
def test_hexbin_log_empty():
906+
# From #23922: creating hexbin with log scaling from empty
907+
# dataset raises ValueError
908+
ax = plt.gca()
909+
ax.hexbin([], [], bins='log')
910+
911+
904912
def test_hexbin_pickable():
905913
# From #1973: Test that picking a hexbin collection works
906914
fig, ax = plt.subplots()

0 commit comments

Comments
 (0)