Skip to content

Commit

Permalink
Make Container._remove_method call correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
dmcdougall committed Sep 21, 2012
1 parent 6b74c57 commit 843efd1
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 843efd1

Please sign in to comment.