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

Skip to content

Commit f3e59a4

Browse files
committed
Axes.annotate sets _remove_method
svn path=/trunk/matplotlib/; revision=8295
1 parent d4e113a commit f3e59a4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/matplotlib/axes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3033,6 +3033,7 @@ def annotate(self, *args, **kwargs):
30333033
self._set_artist_props(a)
30343034
if kwargs.has_key('clip_on'): a.set_clip_path(self.patch)
30353035
self.texts.append(a)
3036+
a._remove_method = lambda h: self.texts.remove(h)
30363037
return a
30373038

30383039
#### Lines and spans

0 commit comments

Comments
 (0)