@@ -5014,7 +5014,7 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
50145014 A `.PolyCollection` defining the hexagonal bins.
50155015
50165016 - `.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 .
50185018 - `.PolyCollection.get_array` contains the values of the M
50195019 hexagons.
50205020
@@ -5192,7 +5192,7 @@ def reduce_C_function(C: array) -> float
51925192 linewidths = [mpl .rcParams ['patch.linewidth' ]]
51935193
51945194 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 )
51965196 if xscale == 'log' :
51975197 polygons [:, :, 0 ] = 10.0 ** polygons [:, :, 0 ]
51985198 xmin = 10.0 ** xmin
@@ -5203,20 +5203,16 @@ def reduce_C_function(C: array) -> float
52035203 ymin = 10.0 ** ymin
52045204 ymax = 10.0 ** ymax
52055205 self .set_yscale (yscale )
5206- collection = mcoll .PolyCollection (
5207- polygons ,
5208- edgecolors = edgecolors ,
5209- linewidths = linewidths ,
5210- )
52115206 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+ )
52205216
52215217 # Set normalizer if bins is 'log'
52225218 if cbook ._str_equal (bins , 'log' ):
0 commit comments