@@ -4925,7 +4925,7 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
4925
4925
A `.PolyCollection` defining the hexagonal bins.
4926
4926
4927
4927
- `.PolyCollection.get_offsets` contains a Mx2 array containing
4928
- the x, y positions of the M hexagon centers.
4928
+ the x, y positions of the M hexagon centers in data coordinates .
4929
4929
- `.PolyCollection.get_array` contains the values of the M
4930
4930
hexagons.
4931
4931
@@ -5103,7 +5103,7 @@ def reduce_C_function(C: array) -> float
5103
5103
linewidths = [mpl .rcParams ['patch.linewidth' ]]
5104
5104
5105
5105
if xscale == 'log' or yscale == 'log' :
5106
- polygons = np .expand_dims (polygon , 0 ) + np . expand_dims ( offsets , 1 )
5106
+ polygons = np .expand_dims (polygon , 0 )
5107
5107
if xscale == 'log' :
5108
5108
polygons [:, :, 0 ] = 10.0 ** polygons [:, :, 0 ]
5109
5109
xmin = 10.0 ** xmin
@@ -5114,20 +5114,16 @@ def reduce_C_function(C: array) -> float
5114
5114
ymin = 10.0 ** ymin
5115
5115
ymax = 10.0 ** ymax
5116
5116
self .set_yscale (yscale )
5117
- collection = mcoll .PolyCollection (
5118
- polygons ,
5119
- edgecolors = edgecolors ,
5120
- linewidths = linewidths ,
5121
- )
5122
5117
else :
5123
- collection = mcoll .PolyCollection (
5124
- [polygon ],
5125
- edgecolors = edgecolors ,
5126
- linewidths = linewidths ,
5127
- offsets = offsets ,
5128
- offset_transform = mtransforms .AffineDeltaTransform (
5129
- self .transData ),
5130
- )
5118
+ polygons = [polygon ]
5119
+
5120
+ collection = mcoll .PolyCollection (
5121
+ polygons ,
5122
+ edgecolors = edgecolors ,
5123
+ linewidths = linewidths ,
5124
+ offsets = offsets ,
5125
+ offset_transform = mtransforms .AffineDeltaTransform (self .transData )
5126
+ )
5131
5127
5132
5128
# Set normalizer if bins is 'log'
5133
5129
if cbook ._str_equal (bins , 'log' ):
0 commit comments