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

Skip to content

Commit da78f69

Browse files
committed
ENH : add stale flag to FancyArrowPatch
1 parent 9c954e8 commit da78f69

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/matplotlib/patches.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4040,6 +4040,7 @@ def set_dpi_cor(self, dpi_cor):
40404040
"""
40414041

40424042
self._dpi_cor = dpi_cor
4043+
self.stale = True
40434044

40444045
def get_dpi_cor(self):
40454046
"""
@@ -4057,16 +4058,19 @@ def set_positions(self, posA, posB):
40574058
self._posA_posB[0] = posA
40584059
if posB is not None:
40594060
self._posA_posB[1] = posB
4061+
self.stale = True
40604062

40614063
def set_patchA(self, patchA):
40624064
""" set the begin patch.
40634065
"""
40644066
self.patchA = patchA
4067+
self.stale = True
40654068

40664069
def set_patchB(self, patchB):
40674070
""" set the begin patch
40684071
"""
40694072
self.patchB = patchB
4073+
self.stale = True
40704074

40714075
def set_connectionstyle(self, connectionstyle, **kw):
40724076
"""
@@ -4095,6 +4099,7 @@ def set_connectionstyle(self, connectionstyle, **kw):
40954099
self._connector = connectionstyle
40964100
else:
40974101
self._connector = ConnectionStyle(connectionstyle, **kw)
4102+
self.stale = True
40984103

40994104
def get_connectionstyle(self):
41004105
"""
@@ -4126,6 +4131,7 @@ def set_arrowstyle(self, arrowstyle=None, **kw):
41264131
self._arrow_transmuter = arrowstyle
41274132
else:
41284133
self._arrow_transmuter = ArrowStyle(arrowstyle, **kw)
4134+
self.stale = True
41294135

41304136
def get_arrowstyle(self):
41314137
"""
@@ -4140,6 +4146,7 @@ def set_mutation_scale(self, scale):
41404146
ACCEPTS: float
41414147
"""
41424148
self._mutation_scale = scale
4149+
self.stale = True
41434150

41444151
def get_mutation_scale(self):
41454152
"""
@@ -4154,6 +4161,7 @@ def set_mutation_aspect(self, aspect):
41544161
ACCEPTS: float
41554162
"""
41564163
self._mutation_aspect = aspect
4164+
self.stale = True
41574165

41584166
def get_mutation_aspect(self):
41594167
"""
@@ -4261,6 +4269,7 @@ def draw(self, renderer):
42614269

42624270
gc.restore()
42634271
renderer.close_group('patch')
4272+
self.stale = False
42644273

42654274

42664275
class ConnectionPatch(FancyArrowPatch):

0 commit comments

Comments
 (0)