Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix Annotation using different units and different coords on x/y. #15886

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
Dec 20, 2019

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Dec 9, 2019

_get_xy always needs to be called with self.xycoord, not just the
coordinate system of either x or y, so that unitful x/y get correctly
converted as needed.

Closes #15849.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@jklymak
Copy link
Member

jklymak commented Dec 11, 2019

Can this get a test that shows it closes the bug?

`_get_xy` always needs to be called with self.xycoord, not just the
coordinate system of either x or y, so that unitful x/y get correctly
converted as needed.
@anntzer anntzer force-pushed the mixed-unit-annotation branch from 6856ea5 to bd21ebd Compare December 11, 2019 18:28
@anntzer
Copy link
Contributor Author

anntzer commented Dec 11, 2019

sure...

@timhoffm timhoffm added this to the v3.2.0 milestone Dec 20, 2019
@timhoffm timhoffm merged commit 7ff965a into matplotlib:master Dec 20, 2019
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Dec 20, 2019
@anntzer anntzer deleted the mixed-unit-annotation branch December 20, 2019 15:34
timhoffm added a commit that referenced this pull request Dec 22, 2019
…886-on-v3.2.x

Backport PR #15886 on branch v3.2.x (Fix Annotation using different units and different coords on x/y.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using pandas.Timestamp in blended coordinate system of ax.annotate.
3 participants