Title: Cursor displays x, y coordinates with too much or too little precision · Issue #5726 · matplotlib/matplotlib · GitHub
Open Graph Title: Cursor displays x, y coordinates with too much or too little precision · Issue #5726 · matplotlib/matplotlib
X Title: Cursor displays x, y coordinates with too much or too little precision · Issue #5726 · matplotlib/matplotlib
Description: Currently, the x, y coordinates of the cursor (displayed by the interactive backend) are displayed with 6 significant digits (basically, this is due to ScalarFormatter.format_data_short using the "-12g" format string, which defaults to 6...
Open Graph Description: Currently, the x, y coordinates of the cursor (displayed by the interactive backend) are displayed with 6 significant digits (basically, this is due to ScalarFormatter.format_data_short using the "...
X Description: Currently, the x, y coordinates of the cursor (displayed by the interactive backend) are displayed with 6 significant digits (basically, this is due to ScalarFormatter.format_data_short using the &...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/5726
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cursor displays x, y coordinates with too much or too little precision","articleBody":"Currently, the x, y coordinates of the cursor (displayed by the interactive backend) are displayed with 6 significant digits (basically, this is due to `ScalarFormatter.format_data_short` using the \"-12g\" format string, which defaults to 6 significant digits). This leads to a few issues.\n- The mouse position is typically only known with pixel-level precision (at least for Qt and Tk), so with screen sizes limited to a few thousand pixels, for axes limited to e.g. [0, 1], the cursor position should only be displayed with 4 significant digits.\n- On the other hand, if the axes limits are far from the origin (say xlim = [1e5, 1e5+1]), the cursor position readout is useless because all significant digits are taken by the base offset.\n\nThus, I propose to change `format_data_short` (which AFAICT is only used for this purpose), so that it displays the coordinates with the same base offset as the axes do (but with the same absolute precision as the additional shift), and the additional shift with 4 significant digits (if we really wanted to do this properly perhaps we can get the axes size in pixels and decide accordingly, but that may be overdoing it).\n\nThoughts?\n","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2015-12-23T08:24:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/5726/matplotlib/issues/5726"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:dbbfd317-bcde-bb1c-01c9-48e8a28d5efa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8C1A:3A401E:9C3EC3:D328E8:6A52B0C4 |
| html-safe-nonce | a3b7d5f9bd483133ec206dfced9ef04b1ad1f451774641c2656ba7a290ae8f82 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QzFBOjNBNDAxRTo5QzNFQzM6RDMyOEU4OjZBNTJCMEM0IiwidmlzaXRvcl9pZCI6IjQ5NTg1MTIyNzQ0MDQ5Nzg4ODQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c8379e69d2d38c84b004b47073d77568b6ec9d4f6daa62edf131d4ab2a89316a |
| hovercard-subject-tag | issue:123620105 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/5726/issue_layout |
| twitter:image | https://opengraph.githubassets.com/413a676c356b5b12f4f3ca1cd9a7abeba5dba0f89cd169cb62a6c1cc0ab080e7/matplotlib/matplotlib/issues/5726 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/413a676c356b5b12f4f3ca1cd9a7abeba5dba0f89cd169cb62a6c1cc0ab080e7/matplotlib/matplotlib/issues/5726 |
| og:image:alt | Currently, the x, y coordinates of the cursor (displayed by the interactive backend) are displayed with 6 significant digits (basically, this is due to ScalarFormatter.format_data_short using the "... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anntzer |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width