@@ -5028,7 +5028,7 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
5028
5028
A `.PolyCollection` defining the hexagonal bins.
5029
5029
5030
5030
- `.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 .
5032
5032
- `.PolyCollection.get_array` contains the values of the M
5033
5033
hexagons.
5034
5034
@@ -5206,7 +5206,7 @@ def reduce_C_function(C: array) -> float
5206
5206
linewidths = [mpl .rcParams ['patch.linewidth' ]]
5207
5207
5208
5208
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 )
5210
5210
if xscale == 'log' :
5211
5211
polygons [:, :, 0 ] = 10.0 ** polygons [:, :, 0 ]
5212
5212
xmin = 10.0 ** xmin
@@ -5217,20 +5217,16 @@ def reduce_C_function(C: array) -> float
5217
5217
ymin = 10.0 ** ymin
5218
5218
ymax = 10.0 ** ymax
5219
5219
self .set_yscale (yscale )
5220
- collection = mcoll .PolyCollection (
5221
- polygons ,
5222
- edgecolors = edgecolors ,
5223
- linewidths = linewidths ,
5224
- )
5225
5220
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
+ )
5234
5230
5235
5231
# Set normalizer if bins is 'log'
5236
5232
if cbook ._str_equal (bins , 'log' ):
0 commit comments