Title: Locators: First visible tick does not have `pos=0` · Issue #2509 · matplotlib/matplotlib · GitHub
Open Graph Title: Locators: First visible tick does not have `pos=0` · Issue #2509 · matplotlib/matplotlib
X Title: Locators: First visible tick does not have `pos=0` · Issue #2509 · matplotlib/matplotlib
Description: I noticed that various Locators have problems designating pos=0 to the first visible tick. While this might not be very important for most people, I still thought I'd mention it here. For AutoDateLocator this happens below a certain thre...
Open Graph Description: I noticed that various Locators have problems designating pos=0 to the first visible tick. While this might not be very important for most people, I still thought I'd mention it here. For AutoDateL...
X Description: I noticed that various Locators have problems designating pos=0 to the first visible tick. While this might not be very important for most people, I still thought I'd mention it here. For AutoD...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/2509
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Locators: First visible tick does not have `pos=0`","articleBody":"I noticed that various Locators have problems designating `pos=0` to the first visible tick. While this might not be very important for most people, I still thought I'd mention it here.\n\nFor `AutoDateLocator` this happens below a certain threshold of x range. Below an x range of around 5e-5 (equal to approximately 5 seconds) the tick with position 0 is not inside the plot anymore.\nI admit that this is a rather low value for date plots and thus might be considered very low priority.\n\nFor `AutoLocator` this seems to be a general problem. Almost always the first visible tick has position 1.\n\nThe following script demonstrates both cases. Zoom in/out on x axes and look at `pos` of the first tick.\n\n``` python\nimport matplotlib.pyplot as plt\nfrom matplotlib.ticker import FuncFormatter\nfrom numpy.random import randn\n\n\ndef print_pos(x, pos=None):\n return \"%s: %s\" % (str(pos), str(x))\n\n\nfig = plt.figure(figsize=(16, 6))\nfig.suptitle(\"xticklabels are 'pos: x'\")\n\nax = fig.add_subplot(211)\nleft = 10\nright = left + 6e-5\nax.plot_date([left, right], [1, 1])\nax.xaxis.set_major_formatter(FuncFormatter(print_pos))\nax.set_title(\"zoom in: leftmost tick has position 1\")\n\nax = fig.add_subplot(212)\nax.plot(randn(20), randn(20))\nax.xaxis.set_major_formatter(FuncFormatter(print_pos))\nax.set_title(\"zoom in/out: leftmost tick has position 1\")\n\nplt.show()\n```\n","author":{"url":"https://github.com/megies","@type":"Person","name":"megies"},"datePublished":"2013-10-10T09:04:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/2509/matplotlib/issues/2509"}
| 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:3c09d089-e7d7-4a1d-a00d-d9dc144ca0e5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E09A:1BECEB:25E46FE:32C42A8:6A5393B8 |
| html-safe-nonce | 1540b494777ecaca55ae314d989fafb3d0f055beff1255c303969667e7a1d76b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDlBOjFCRUNFQjoyNUU0NkZFOjMyQzQyQTg6NkE1MzkzQjgiLCJ2aXNpdG9yX2lkIjoiODMwNzIyODU1MDU5NzE1MzcyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c696ed68ec6c752f8e0163899d414adac708667ca9f951e85c596450c9f97fce |
| hovercard-subject-tag | issue:20794697 |
| 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/2509/issue_layout |
| twitter:image | https://opengraph.githubassets.com/34efbdfd9f538b4597615068aca0883fce10babd49c8481e81d8125e77d72508/matplotlib/matplotlib/issues/2509 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/34efbdfd9f538b4597615068aca0883fce10babd49c8481e81d8125e77d72508/matplotlib/matplotlib/issues/2509 |
| og:image:alt | I noticed that various Locators have problems designating pos=0 to the first visible tick. While this might not be very important for most people, I still thought I'd mention it here. For AutoDateL... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | megies |
| 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