@@ -5028,7 +5028,7 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
50285028 A `.PolyCollection` defining the hexagonal bins.
50295029
50305030 - `.PolyCollection.get_offsets` contains a Mx2 array containing
5031- the x, y positions of the M hexagon centers.
5031+ the x, y positions of the M hexagon centers in data coordinates .
50325032 - `.PolyCollection.get_array` contains the values of the M
50335033 hexagons.
50345034
@@ -5206,7 +5206,7 @@ def reduce_C_function(C: array) -> float
52065206 linewidths = [mpl .rcParams ['patch.linewidth' ]]
52075207
52085208 if xscale == 'log' or yscale == 'log' :
5209- polygons = np .expand_dims (polygon , 0 ) + np . expand_dims ( offsets , 1 )
5209+ polygons = np .expand_dims (polygon , 0 )
52105210 if xscale == 'log' :
52115211 polygons [:, :, 0 ] = 10.0 ** polygons [:, :, 0 ]
52125212 xmin = 10.0 ** xmin
@@ -5217,20 +5217,16 @@ def reduce_C_function(C: array) -> float
52175217 ymin = 10.0 ** ymin
52185218 ymax = 10.0 ** ymax
52195219 self .set_yscale (yscale )
5220- collection = mcoll .PolyCollection (
5221- polygons ,
5222- edgecolors = edgecolors ,
5223- linewidths = linewidths ,
5224- )
52255220 else :
5226- collection = mcoll .PolyCollection (
5227- [polygon ],
5228- edgecolors = edgecolors ,
5229- linewidths = linewidths ,
5230- offsets = offsets ,
5231- offset_transform = mtransforms .AffineDeltaTransform (
5232- self .transData ),
5233- )
5221+ polygons = [polygon ]
5222+
5223+ collection = mcoll .PolyCollection (
5224+ polygons ,
5225+ edgecolors = edgecolors ,
5226+ linewidths = linewidths ,
5227+ offsets = offsets ,
5228+ offset_transform = mtransforms .AffineDeltaTransform (self .transData )
5229+ )
52345230
52355231 # Set normalizer if bins is 'log'
52365232 if cbook ._str_equal (bins , 'log' ):
0 commit comments