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

NotImplementedError: cannot remove artist #1747

Closed
mameghani opened this issue Feb 13, 2013 · 2 comments
Closed

NotImplementedError: cannot remove artist #1747

mameghani opened this issue Feb 13, 2013 · 2 comments

Comments

@mameghani
Copy link

Some/many/all(?) artists cannot be removed from a figure:

from matplotlib.figure import Figure
fig = Figure()
caption = fig.suptitle("test")
caption.remove()
Traceback (most recent call last):
  File "<pyshell#6>", line 1, in <module>
    caption.remove()
  File "C:\Programme\Python27\lib\site-packages\matplotlib\artist.py",
line 134, in remove
    raise NotImplementedError('cannot remove artist')
NotImplementedError: cannot remove artist
@tacaswell
Copy link
Member

So the issue here is that to remove an artist the add_artist function of Axes adds a _remove_method method to the artist which figure does not. This should probably fixed for the non-axes artists that can be added to Figure.

cimarronm added a commit to cimarronm/matplotlib that referenced this issue Jan 4, 2014
pelson added a commit that referenced this issue Jan 8, 2014
Bugfix for issue #1747. Allows removal of figure text artists.
@pelson
Copy link
Member

pelson commented Jan 9, 2014

Closed by #2704 .

@pelson pelson closed this as completed Jan 9, 2014
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

3 participants