Skip to content

Commit d1acaf2

Browse files
committed
Fix rotation in RegularPolyCollection
1 parent 236355c commit d1acaf2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/matplotlib/collections.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,15 @@ def get_numsides(self):
927927
def get_rotation(self):
928928
return self._rotation
929929

930+
@allow_rasterization
931+
def draw(self, renderer):
932+
self.set_sizes(self._sizes, self.figure.dpi)
933+
self._transforms = [
934+
transforms.Affine2D(x).rotate(-self._rotation).get_matrix()
935+
for x in self._transforms
936+
]
937+
Collection.draw(self, renderer)
938+
930939

931940
class StarPolygonCollection(RegularPolyCollection):
932941
"""

0 commit comments

Comments
 (0)