Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Fix clear of Axes that are shared.#20826
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This reverts a portion ofa15bc47,which cleared information that was only known by Subplots or GridSpec atinitialization time, and stored on the ticks.Probably the storage of this information and initialization needs to bethoroughly reviewed so that it is stored in the right place.Fixesmatplotlib#20721.
tacaswell left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Despite my view that "clear" should be closer to "go back to state just after init", that has not in fact been the behavior. The reverts a change that started clearing more things and resulted in two bug reports as regressions in 3.4.2 for 3.4.1.
We should merge this for 3.4.3 so we have one micro version with undocumented behavior change. If we feel compelled we can open up a follow on discussion to fully defined (and document) what clear / clashould do.
jklymak commentedAug 11, 2021
The meaning of "clear" is pretty ambiguous, and not helped by either the docstring, or the code. Returning a new axes is certainly appealing, but again, which of the initial arguments passed to the constructor should be preserved? I think folks must have figured it out by trial and error. |
…826-on-v3.4.xBackport PR#20826 on branch v3.4.x (Fix clear of Axes that are shared.)
This is a follow-up tomatplotlib#20826, which makes the exceptions from clearingmore explicit.
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
This reverts a portion ofa15bc47, which cleared information that was only known by Subplots or GridSpec at initialization time, and stored on the ticks.
Probably the storage of this information and initialization needs to be thoroughly reviewed so that it is stored in the right place.
Fixes#20721.
Fixes#20219.
PR Checklist
pytestpasses).flake8on changed files to check).flake8-docstringsand 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).