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

Appearance settings

Conversation

@anntzer
Copy link
Contributor

@anntzer anntzer commented Mar 17, 2019

Despite its name, format_data_short is actually used to format the x/y
cursor data; it makes sense to also use it for image data. By doing so,
e.g. for imshow([[.123, .987]]), one gets the more accurate .123
string when the mouse is over the first pixel instead of .1 that
__call__ returns (which would have been intended as a tick label).

Release critical as an improvement over #12459.

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

Despite its name, format_data_short is actually used to format the x/y
cursor data; it makes sense to also use it for image data.  By doing so,
e.g. for `imshow([[.123, .987]])`, one gets the more accurate `.123`
string when the mouse is over the first pixel instead of `.1` that
`__call__` returns (which would have been intended as a tick label).
@anntzer anntzer added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Mar 17, 2019
@anntzer anntzer added this to the v3.1.0 milestone Mar 17, 2019
@timhoffm timhoffm merged commit 20a409c into matplotlib:master Mar 17, 2019
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Mar 17, 2019
@anntzer anntzer deleted the format_cursor_data branch March 17, 2019 20:05
timhoffm added a commit that referenced this pull request Mar 17, 2019
…684-on-v3.1.x

Backport PR #13684 on branch v3.1.x (Use format_data_short to format image cursor data.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.