@@ -5014,7 +5014,7 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
5014
5014
A `.PolyCollection` defining the hexagonal bins.
5015
5015
5016
5016
- `.PolyCollection.get_offsets` contains a Mx2 array containing
5017
- the x, y positions of the M hexagon centers.
5017
+ the x, y positions of the M hexagon centers in data coordinates .
5018
5018
- `.PolyCollection.get_array` contains the values of the M
5019
5019
hexagons.
5020
5020
@@ -5192,7 +5192,7 @@ def reduce_C_function(C: array) -> float
5192
5192
linewidths = [mpl .rcParams ['patch.linewidth' ]]
5193
5193
5194
5194
if xscale == 'log' or yscale == 'log' :
5195
- polygons = np .expand_dims (polygon , 0 ) + np . expand_dims ( offsets , 1 )
5195
+ polygons = np .expand_dims (polygon , 0 )
5196
5196
if xscale == 'log' :
5197
5197
polygons [:, :, 0 ] = 10.0 ** polygons [:, :, 0 ]
5198
5198
xmin = 10.0 ** xmin
@@ -5203,20 +5203,16 @@ def reduce_C_function(C: array) -> float
5203
5203
ymin = 10.0 ** ymin
5204
5204
ymax = 10.0 ** ymax
5205
5205
self .set_yscale (yscale )
5206
- collection = mcoll .PolyCollection (
5207
- polygons ,
5208
- edgecolors = edgecolors ,
5209
- linewidths = linewidths ,
5210
- )
5211
5206
else :
5212
- collection = mcoll .PolyCollection (
5213
- [polygon ],
5214
- edgecolors = edgecolors ,
5215
- linewidths = linewidths ,
5216
- offsets = offsets ,
5217
- offset_transform = mtransforms .AffineDeltaTransform (
5218
- self .transData ),
5219
- )
5207
+ polygons = [polygon ]
5208
+
5209
+ collection = mcoll .PolyCollection (
5210
+ polygons ,
5211
+ edgecolors = edgecolors ,
5212
+ linewidths = linewidths ,
5213
+ offsets = offsets ,
5214
+ offset_transform = mtransforms .AffineDeltaTransform (self .transData )
5215
+ )
5220
5216
5221
5217
# Set normalizer if bins is 'log'
5222
5218
if cbook ._str_equal (bins , 'log' ):
0 commit comments