@@ -1656,6 +1656,7 @@ def add_artist(self, a):
1656
1656
self ._set_artist_props (a )
1657
1657
a .set_clip_path (self .patch )
1658
1658
a ._remove_method = lambda h : self .artists .remove (h )
1659
+ self .stale = True
1659
1660
return a
1660
1661
1661
1662
def add_collection (self , collection , autolim = True ):
@@ -1678,6 +1679,7 @@ def add_collection(self, collection, autolim=True):
1678
1679
self .update_datalim (collection .get_datalim (self .transData ))
1679
1680
1680
1681
collection ._remove_method = lambda h : self .collections .remove (h )
1682
+ self .stale = True
1681
1683
return collection
1682
1684
1683
1685
def add_image (self , image ):
@@ -1689,6 +1691,7 @@ def add_image(self, image):
1689
1691
self ._set_artist_props (image )
1690
1692
self .images .append (image )
1691
1693
image ._remove_method = lambda h : self .images .remove (h )
1694
+ self .stale = True
1692
1695
return image
1693
1696
1694
1697
def add_line (self , line ):
@@ -1707,8 +1710,19 @@ def add_line(self, line):
1707
1710
line .set_label ('_line%d' % len (self .lines ))
1708
1711
self .lines .append (line )
1709
1712
line ._remove_method = lambda h : self .lines .remove (h )
1713
+ self .stale = True
1710
1714
return line
1711
1715
1716
+ def _add_text (self , txt ):
1717
+ """
1718
+
1719
+ """
1720
+ self ._set_artist_props (txt )
1721
+ self .texts .append (txt )
1722
+ txt ._remove_method = lambda h : self .texts .remove (h )
1723
+ self .stale = True
1724
+ return txt
1725
+
1712
1726
def _update_line_limits (self , line ):
1713
1727
"""
1714
1728
Figures out the data limit of the given line, updating self.dataLim.
0 commit comments