Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FIX: do not replace the Axes._children list object#24677

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ksunden merged 1 commit intomatplotlib:mainfromtacaswell:fix/hostaxes_remove
Dec 9, 2022

Conversation

tacaswell
Copy link
Member

PR Summary

Each Artist keeps a reference toAxes._children.remove asart._remove_method. If we replace the_children instance on the Axes with a different list instance the Artists will not be updated and their remove method will refer to the wrong list. This will cause subsequent failures on the next draw because on remove we reset theart.axes andart.figure to None.

xrefhttps://discourse.matplotlib.org/t/host-subplot-and-artist-remove/23374

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (andpytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).

Each Artist keeps a reference to `Axes._children.remove` as`art._remove_method`.  If we replace the `_children` instance on the Axes witha different list instance the Artists will not be updated and their removemethod will refer to the wrong list.  This will cause subsequent failures onthe next draw because on remove we reset the `art.axes` and `art.figure` toNone.xrefhttps://discourse.matplotlib.org/t/host-subplot-and-artist-remove/23374
@tacaswelltacaswell added this to thev3.6.3 milestoneDec 9, 2022
@ksundenksunden merged commit4d52a3e intomatplotlib:mainDec 9, 2022
@lumberbot-app
Copy link

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.6.xgit pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 4d52a3e6feffb091e737da1c06943ebd80d67c25
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #24677: FIX: do not replace the Axes._children list object'
  1. Push to a named branch:
git push YOURFORK v3.6.x:auto-backport-of-pr-24677-on-v3.6.x
  1. Create a PR against branch v3.6.x, I would have named this PR:

"Backport PR#24677 on branch v3.6.x (FIX: do not replace the Axes._children list object)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove theStill Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free tosuggest an improvement.

rcomer pushed a commit to rcomer/matplotlib that referenced this pull requestDec 9, 2022
…list objectManual backport due to conflicts, which were just additional tests inmain frommatplotlib#23861, so simply removed these.
tacaswell added a commit that referenced this pull requestDec 9, 2022
Backport PR#24677 on branch v3.6.x (FIX: do not replace the Axes._children list object)
@ksundenksunden mentioned this pull requestFeb 20, 2023
6 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@anntzeranntzeranntzer approved these changes

@ksundenksundenksunden approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.6.3
Development

Successfully merging this pull request may close these issues.

4 participants
@tacaswell@anntzer@ksunden@QuLogic

[8]ページ先頭

©2009-2025 Movatter.jp