Skip to content

Commit 8acd1bb

Browse files
committed
ENH : add stale flag to AnnotationBbox
1 parent 1228534 commit 8acd1bb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/matplotlib/offsetbox.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,6 +1406,7 @@ def xyann(self):
14061406
@xyann.setter
14071407
def xyann(self, xyann):
14081408
self.xybox = xyann
1409+
self.stale = True
14091410

14101411
@property
14111412
def anncoords(self):
@@ -1414,6 +1415,7 @@ def anncoords(self):
14141415
@anncoords.setter
14151416
def anncoords(self, coords):
14161417
self.boxcoords = coords
1418+
self.stale = True
14171419

14181420
def contains(self, event):
14191421
t, tinfo = self.offsetbox.contains(event)
@@ -1446,6 +1448,7 @@ def set_fontsize(self, s=None):
14461448
s = rcParams["legend.fontsize"]
14471449

14481450
self.prop = FontProperties(size=s)
1451+
self.stale = True
14491452

14501453
def get_fontsize(self, s=None):
14511454
"""
@@ -1552,6 +1555,7 @@ def draw(self, renderer):
15521555
self.patch.draw(renderer)
15531556

15541557
self.offsetbox.draw(renderer)
1558+
self.stale = False
15551559

15561560

15571561
class DraggableBase(object):

0 commit comments

Comments
 (0)