Introduce ArtistList for FigureBase#31746
Draft
rcomer wants to merge 4 commits into
Draft
Conversation
pyside2 does not support python 3.12+
Following matplotlib#18216 for Axes artists, combine all figure artists except axes and subfigures into a single list and deprecate modifying the lists directly.
Member
Author
|
It seems I have discovered something that only works at py314 🧐 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR summary
At #31730 (comment) Tom said
This PR moves the
Axes.ArtistListinto theartistmodule and generalises it so it can work for both figures and axes. The newFigure.ArtistListsubclasses that just to add the deprecated methods. I adapted the deprecated methods and their tests from #18216, where this was originally done forAxes.Closes #31730, since now
figimageexplicitly uses the identity transform by default, andadd_artistputs the image back into the image list. So both things from #31730 (comment) are resolved.Currently this includes the commits from #31740 as I also modified
warn_externalthere. Will rebase if necessary when that is merged.AI Disclosure
I asked duck.ai how to get a class as a string, to use in the
ArtistListreprself._parent.__class__.__name__.PR checklist