Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't remove StemContainer #5692

Closed
goretkin opened this issue Dec 17, 2015 · 1 comment
Closed

Can't remove StemContainer #5692

goretkin opened this issue Dec 17, 2015 · 1 comment
Assignees
Milestone

Comments

@goretkin
Copy link
Contributor

In [7]: c = ax.stem([1,2],[2,1])

In [8]: c.remove()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-8-dbc7beefa92d> in <module>()
----> 1 c.remove()

python2.7/site-packages/matplotlib/container.pyc in remove(self)
     33     def remove(self):
     34         for c in self:
---> 35             c.remove()
     36 
     37         if self._remove_method:

TypeError: remove() takes exactly one argument (0 given)

The markers get removed from the plot, however the lines stay. That's because ax.plot returns a listof <matplotlib.lines.Line2D>, and while list has a remove method, it's not what is intended.

In [9]: matplotlib.__version__
Out[9]: '1.4.3'
@tacaswell tacaswell added this to the Critical bugfix release (1.5.1) milestone Dec 18, 2015
@tacaswell
Copy link
Member

also in 1.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants