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

Skip to content

Commit c5df792

Browse files
committed
ENH : add stale flag to AuxTransformBox
1 parent ebf7b91 commit c5df792

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/matplotlib/offsetbox.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,7 @@ def add_artist(self, a):
862862
'Add any :class:`~matplotlib.artist.Artist` to the container box'
863863
self._children.append(a)
864864
a.set_transform(self.get_transform())
865+
self.stale = True
865866

866867
def get_transform(self):
867868
"""
@@ -888,6 +889,7 @@ def set_offset(self, xy):
888889

889890
self.offset_transform.clear()
890891
self.offset_transform.translate(xy[0], xy[1])
892+
self.stale = True
891893

892894
def get_offset(self):
893895
"""
@@ -932,6 +934,7 @@ def draw(self, renderer):
932934
c.draw(renderer)
933935

934936
bbox_artist(self, renderer, fill=False, props=dict(pad=0.))
937+
self.stale = False
935938

936939

937940
class AnchoredOffsetbox(OffsetBox):

0 commit comments

Comments
 (0)