Skip to content

Commit 80b3c71

Browse files
committed
Bugfix for issue matplotlib#1747. Allows removal of figure text artists.
1 parent 9be5ac4 commit 80b3c71

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/matplotlib/figure.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,6 +1185,7 @@ def text(self, x, y, s, *args, **kwargs):
11851185
t.update(override)
11861186
self._set_artist_props(t)
11871187
self.texts.append(t)
1188+
t._remove_method = lambda h: self.texts.remove(h)
11881189
return t
11891190

11901191
def _set_artist_props(self, a):

0 commit comments

Comments
 (0)