Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 60e21f0

Browse files
committed
Merge pull request matplotlib#4752 from tacaswell/fix_rect_uint
FIX: cast input to Rectangle to float
2 parents 336c1bb + d7ea1f4 commit 60e21f0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/matplotlib/patches.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -636,11 +636,11 @@ def __init__(self, xy, width, height, angle=0.0, **kwargs):
636636

637637
Patch.__init__(self, **kwargs)
638638

639-
self._x = xy[0]
640-
self._y = xy[1]
641-
self._width = width
642-
self._height = height
643-
self._angle = angle
639+
self._x = float(xy[0])
640+
self._y = float(xy[1])
641+
self._width = float(width)
642+
self._height = float(height)
643+
self._angle = float(angle)
644644
# Note: This cannot be calculated until this is added to an Axes
645645
self._rect_transform = transforms.IdentityTransform()
646646

0 commit comments

Comments
 (0)