File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -4927,7 +4927,9 @@ def reduce_C_function(C: array) -> float
4927
4927
# autoscale the norm with current accum values if it hasn't been set
4928
4928
if norm is not None :
4929
4929
if norm .vmin is None and norm .vmax is None :
4930
- norm .autoscale (accum )
4930
+ norm .autoscale_None (accum )
4931
+ norm .vmin = np .ma .masked if norm .vmin is None else norm .vmin
4932
+ norm .vmax = np .ma .masked if norm .vmax is None else norm .vmax
4931
4933
4932
4934
if bins is not None :
4933
4935
if not np .iterable (bins ):
Original file line number Diff line number Diff line change @@ -901,6 +901,14 @@ def test_hexbin_empty():
901
901
ax .hexbin ([], [])
902
902
903
903
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
+
904
912
def test_hexbin_pickable ():
905
913
# From #1973: Test that picking a hexbin collection works
906
914
fig , ax = plt .subplots ()
You can’t perform that action at this time.
0 commit comments