Fix removal of shared polar axes. #20009
Merged
+56
−27
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.
There's really two separate fixes here:
Move isDefault_{maj,min}{loc,fmt} tracking to the Ticker instances,
where they logically belong (note the previous need to additionally
track them manually on axes removal, when that info was tracked on
the Axis). This has the side effect of fixing removal of sharex'd
polar axes, as ThetaLocators rely on _AxisWrappers which don't have
that isDefault attribute. (Note that the patch would have resulted
in a net decrease of lines of code if it didn't need to maintain
backcompat on isDefault_foos). Closes Removal of x-shared polar axes causes crash #19988. Split out of Allow sharing Locators and Formatters across Axises. #13482.
Ensure that RadialLocator correctly propagates Axis information to
the linear locator it wraps (consistently with ThetaLocator), so that
when an axes is removed the wrapped linear locator doesn't stay
pointing at an obsolete axes. This, together with the first patch,
fixes removal of sharey'd polar axes. Closes Removal of y-shared polar axes causes crash at draw time #19989.
PR Summary
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).