Permalink
Browse files

Make Container._remove_method call correctly

  • Loading branch information...
1 parent 6b74c57 commit 843efd18e149d80d20affc72f2f8ddc1eae7fc2e @dmcdougall committed Sep 21, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/matplotlib/axes.py
  2. +1 −1 lib/matplotlib/container.py
View
@@ -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
@@ -29,7 +29,7 @@ def remove(self):
c.remove()
if self._remove_method:
- self._remove_method()
+ self._remove_method(self)
def get_label(self):
"""

1 comment on commit 843efd1

pelson commented on 843efd1 Sep 22, 2012

Cherry picked into the 1.2.x branch: 1d6fb7d

Please sign in to comment.