Skip to content

Commit

Permalink
Merge pull request matplotlib#1296 from dmcdougall/del_container
Browse files Browse the repository at this point in the history
Make Container._remove_method call correctly
  • Loading branch information
pelson committed Sep 22, 2012
2 parents 6b74c57 + 843efd1 commit a881fd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/matplotlib/axes.py
Expand Up @@ -1621,7 +1621,7 @@ def add_container(self, container):
if not label:
container.set_label('_container%d'%len(self.containers))
self.containers.append(container)
container.set_remove_method(lambda h: self.containers.remove(container))
container.set_remove_method(lambda h: self.containers.remove(h))
return container


Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/container.py
Expand Up @@ -29,7 +29,7 @@ def remove(self):
c.remove()

if self._remove_method:
self._remove_method()
self._remove_method(self)

def get_label(self):
"""
Expand Down

0 comments on commit a881fd9

Please sign in to comment.