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

Skip to content

Commit f929f74

Browse files
committed
Merge pull request #930 from mdboom/yaarrow_constructor
YAArrow.figure gets overwritten during superclass construction
2 parents 21fad58 + 37ae231 commit f929f74

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/matplotlib/patches.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,13 +1031,14 @@ def __init__(self, figure, xytip, xybase, width=4, frac=0.1, headwidth=12, **kwa
10311031
%(Patch)s
10321032
10331033
"""
1034-
self.figure = figure
10351034
self.xytip = xytip
10361035
self.xybase = xybase
10371036
self.width = width
10381037
self.frac = frac
10391038
self.headwidth = headwidth
10401039
Patch.__init__(self, **kwargs)
1040+
# Set self.figure after Patch.__init__, since it sets self.figure to None
1041+
self.figure = figure
10411042

10421043
def get_path(self):
10431044
# Since this is dpi dependent, we need to recompute the path
@@ -4240,6 +4241,3 @@ def draw(self, renderer):
42404241
return
42414242

42424243
FancyArrowPatch.draw(self, renderer)
4243-
4244-
4245-

0 commit comments

Comments
 (0)