Title: axes limits (in old "round_numbers" mode) affected by floating point issues · Issue #5767 · matplotlib/matplotlib · GitHub
Open Graph Title: axes limits (in old "round_numbers" mode) affected by floating point issues · Issue #5767 · matplotlib/matplotlib
X Title: axes limits (in old "round_numbers" mode) affected by floating point issues · Issue #5767 · matplotlib/matplotlib
Description: Compare In [1]: plt.plot([0, .2]); plt.ylim() Out[1]: (0.0, 0.20000000000000001) In [2]: plt.plot([-.1, .2]); plt.ylim() Out[2]: (-0.10000000000000001, 0.25) Note how the upper ylim changes from 0.2 to 0.25. This behavior is even tested ...
Open Graph Description: Compare In [1]: plt.plot([0, .2]); plt.ylim() Out[1]: (0.0, 0.20000000000000001) In [2]: plt.plot([-.1, .2]); plt.ylim() Out[2]: (-0.10000000000000001, 0.25) Note how the upper ylim changes from 0....
X Description: Compare In [1]: plt.plot([0, .2]); plt.ylim() Out[1]: (0.0, 0.20000000000000001) In [2]: plt.plot([-.1, .2]); plt.ylim() Out[2]: (-0.10000000000000001, 0.25) Note how the upper ylim changes from 0....
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/5767
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"axes limits (in old \"round_numbers\" mode) affected by floating point issues","articleBody":"Compare\n\n```\nIn [1]: plt.plot([0, .2]); plt.ylim()\nOut[1]: (0.0, 0.20000000000000001)\n\nIn [2]: plt.plot([-.1, .2]); plt.ylim()\nOut[2]: (-0.10000000000000001, 0.25)\n```\n\nNote how the upper ylim changes from 0.2 to 0.25. This behavior is even tested (indirectly) by `test_axes:test_vline_limit`. I intend to **change this behavior** in my work on #5738/#5755 so that the upper limit is actually 0.2 in both cases (basically relying on `matplotlib.ticker.Base`, which has been written exactly to handle this).\n\nThoughts?\n","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2015-12-30T18:16:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/5767/matplotlib/issues/5767"}
| 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:dc002a6c-66f0-bf84-e394-b29ee42a41bd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C76E:54EC2:57181C:74C01C:6A534728 |
| html-safe-nonce | 0f47fc6c41de09b2d92857c4288731acd5558d1fd4460a26ec70ac3e6caeeda6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzZFOjU0RUMyOjU3MTgxQzo3NEMwMUM6NkE1MzQ3MjgiLCJ2aXNpdG9yX2lkIjoiNDI4OTM2ODU3NTk4NTI3MjYxNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d90002c953ec5bb00aa8cbf40e8aff7f578e304ad195b25aacf5808898b7059d |
| hovercard-subject-tag | issue:124382146 |
| 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/5767/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f89911d6c55cb4dc2ceb0c74ef0987167cdbaa46b454bce00d86794d54eda5a7/matplotlib/matplotlib/issues/5767 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f89911d6c55cb4dc2ceb0c74ef0987167cdbaa46b454bce00d86794d54eda5a7/matplotlib/matplotlib/issues/5767 |
| og:image:alt | Compare In [1]: plt.plot([0, .2]); plt.ylim() Out[1]: (0.0, 0.20000000000000001) In [2]: plt.plot([-.1, .2]); plt.ylim() Out[2]: (-0.10000000000000001, 0.25) Note how the upper ylim changes from 0.... |
| 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