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
Some tests accessing matplotlib.axes.Axes.artists fail with Matplotlib 3.5.0b1 #442
Comments
Again, thanks to @ericpre for running kikuchipy and other HyperSpy extensions against development versions of our dependencies at https://github.com/hyperspy/hyperspy-extensions-list. |
The failure seems to be related with a API deprecation to remove artists in matplotlib 3.5 but as you will know, it should be only warning. Sometimes, it is possible that there is a bug in the deprecation, in which case, it will be good that you report it while matplotlib in still in beta/rc. |
What would be great to do: hyperspy/hyperspy-extensions-list#13 |
I checked, and neither an error nor a warning is raised by Matplotlib when adding an artist and then accessing |
Apparently from |
However we should change the |
Sorry, my comments above was slightly misleading - in hyperspy, there are warnings about removing artists!
Yes, according to https://matplotlib.org/devdocs/api/next_api_changes/deprecations/18216-ES.html, this seems to be on the right track. This and changing how to assert where they are kept! |
Thanks for the link to the page I was after! |
Fixed in #445. |
Specific tests: https://github.com/hyperspy/hyperspy-extensions-list/runs/3551171059?check_suite_focus=true#step:13:1
Don't know why, butthis should be fixed. Using matplotlib 3.5 shouldn't break any functionality, just tests.Solution: In the tests, we should access the patches (artists) from
Axes.patches
, since that's what they are. And add them to the axes viaAxes.add_patch()
instead ofAxes.add_artist()
.The text was updated successfully, but these errors were encountered: