8000 Fix Axis scale on twinned Axes. by QuLogic · Pull Request #18393 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Fix Axis scale on twinned Axes. #18393

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

Merged
merged 1 commit into from
Sep 11, 2020
Merged

Conversation

QuLogic
Copy link
Member
@QuLogic QuLogic commented Sep 2, 2020

PR Summary

If Axes._sharex is not set, then the subsequent Axes.cla will change the Axis scale to linear. If Axes._sharex is set, then Axes.cla will call Axes.sharex just as was done here, but without resetting scale to linear.

Fixes #18385.

This won't pass yet, as it turns out that twinned Axes double-draw the frame, though if we really need to apply this quickly, I can increase the tolerance.

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 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 should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and pydocstyle<4 and run flake8 --docstring-convention=all).
  • [n/a] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [n/a] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@QuLogic QuLogic added this to the v3.3.2 milestone Sep 2, 2020
If `Axes._sharex` is not set, then the subsequent `Axes.cla` will change
the Axis scale to linear. If `Axes._sharex` is set, then `Axes.cla` will
call `Axes.sharex` just as was done here, but without resetting scale to
linear.
@QuLogic QuLogic marked this pull request as ready for review September 2, 2020 07:21
@QuLogic
Copy link
Member Author
QuLogic commented Sep 2, 2020

This won't pass yet, as it turns out that twinned Axes double-draw the frame, though if we really need to apply this quickly, I can increase the tolerance.

I changed my mind as that's a bit more work that we maybe don't want to backport, so I tweaked the test a bit to pass for now.

@dopplershift dopplershift merged commit 3e13f81 into matplotlib:master Sep 11, 2020
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Sep 11, 2020
@QuLogic QuLogic deleted the twin-scale branch September 11, 2020 23:42
dopplershift added a commit that referenced this pull request Sep 11, 2020
…393-on-v3.3.x

Backport PR #18393 on branch v3.3.x (Fix Axis scale on twinned Axes.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

twinx not respecting log-scale
3 participants
0