Thanks to visit codestin.com
Credit goes to github.com

Skip to content

cla(), clf() should unset the .axes and .figure attributes of deparented artists #6982

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

Closed
anntzer opened this issue Aug 26, 2016 · 0 comments · Fixed by #24627
Closed

cla(), clf() should unset the .axes and .figure attributes of deparented artists #6982

anntzer opened this issue Aug 26, 2016 · 0 comments · Fixed by #24627
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Aug 26, 2016

mpl2.0b3: Removing an artist from its axes unsets its .axes attribute, but clearing the axes does not do so.

In [11]: f, a = plt.subplots(); l, = a.plot([1, 2]); l.remove(); print(l.axes)
None

In [12]: f, a = plt.subplots(); l, = a.plot([1, 2]); a.cla(); print(l.axes)
Axes(0.125,0.11;0.775x0.77)
@tacaswell tacaswell added this to the 2.1 (next point release) milestone Aug 27, 2016
@tacaswell tacaswell modified the milestones: 2.1 (next point release), 2.2 (next next feature release) Oct 3, 2017
@tacaswell tacaswell modified the milestones: needs sorting, v3.1 Aug 30, 2018
@anntzer anntzer modified the milestones: v3.1.0, v3.2.0 Feb 25, 2019
@tacaswell tacaswell modified the milestones: v3.2.0, needs sorting Sep 10, 2019
tacaswell added a commit to tacaswell/matplotlib that referenced this issue Dec 4, 2022
Reset the Axes and Figure of the children to None to help break cycles.

Closes matplotlib#6982
@tacaswell tacaswell modified the milestones: future releases, v3.7.0 Dec 5, 2022
tacaswell added a commit to tacaswell/matplotlib that referenced this issue Dec 5, 2022
Reset the Axes and Figure of the children to None to help break cycles.

Closes matplotlib#6982
tacaswell added a commit to tacaswell/matplotlib that referenced this issue Dec 5, 2022
Reset the Axes and Figure of the children to None to help break cycles.

Closes matplotlib#6982
melissawm pushed a commit to melissawm/matplotlib that referenced this issue Dec 19, 2022
Reset the Axes and Figure of the children to None to help break cycles.

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

Successfully merging a pull request may close this issue.

2 participants