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 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

Merged
jklymak merged 1 commit intomatplotlib:masterfromQuLogic:fix-shared-clear
Aug 12, 2021

Conversation

QuLogic
Copy link
Member

@QuLogicQuLogic commentedAug 11, 2021
edited
Loading

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

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (runflake8 on changed files to check).
  • [n/a] New features are documented, with examples if plot related.
  • [n/a] Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • [n/a] Conforms to Matplotlib style conventions (installflake8-docstrings and runflake8 --docstring-convention=all).
  • [n/a] New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • [n/a] API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).

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.
Copy link
Member

@tacaswelltacaswell left a 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.

neutrinoceros reacted with thumbs up emoji
@tacaswelltacaswell added this to thev3.4.3 milestoneAug 11, 2021
@jklymak
Copy link
Member

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.

@jklymakjklymak merged commitabf5f04 intomatplotlib:masterAug 12, 2021
@QuLogicQuLogic deleted the fix-shared-clear branchAugust 12, 2021 20:05
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestAug 12, 2021
QuLogic added a commit that referenced this pull requestAug 12, 2021
…826-on-v3.4.xBackport PR#20826 on branch v3.4.x (Fix clear of Axes that are shared.)
timhoffm added a commit to timhoffm/matplotlib that referenced this pull requestMar 3, 2022
This is a follow-up tomatplotlib#20826, which makes the exceptions from clearingmore explicit.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

@jklymakjklymakjklymak approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.4.3
Development

Successfully merging this pull request may close these issues.

ax.clear() adds extra ticks, un-hides shared-axis tick labels Regression: undocumented change of behaviour in mpl 3.4.2 with axis ticks direction
3 participants
@QuLogic@jklymak@tacaswell

[8]ページ先頭

©2009-2025 Movatter.jp