Title: the limits of axes are inexact with mplot3d · Issue #18052 · matplotlib/matplotlib · GitHub
Open Graph Title: the limits of axes are inexact with mplot3d · Issue #18052 · matplotlib/matplotlib
X Title: the limits of axes are inexact with mplot3d · Issue #18052 · matplotlib/matplotlib
Description: I take an example from https://stackoverflow.com/questions/23951230/python-axis-limit-in-matplotlib In mplot3d, when you set, for example, set_xlim(0, 0.8), the outcome has an extra like set_xlim(0 - eps, 0.8 + eps), where eps is related...
Open Graph Description: I take an example from https://stackoverflow.com/questions/23951230/python-axis-limit-in-matplotlib In mplot3d, when you set, for example, set_xlim(0, 0.8), the outcome has an extra like set_xlim(0...
X Description: I take an example from https://stackoverflow.com/questions/23951230/python-axis-limit-in-matplotlib In mplot3d, when you set, for example, set_xlim(0, 0.8), the outcome has an extra like set_xlim(0...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/18052
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"the limits of axes are inexact with mplot3d","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\nI take an example from\r\nhttps://stackoverflow.com/questions/23951230/python-axis-limit-in-matplotlib\r\n\r\nIn mplot3d, when you set, for example, `set_xlim(0, 0.8)`, the outcome has an extra like `set_xlim(0 - eps, 0.8 + eps)`, where eps is related to `deltas`.\r\nhttps://github.com/matplotlib/matplotlib/blob/6e76411a4f3e4cc54cae562529d8973fc12e4497/lib/mpl_toolkits/mplot3d/axis3d.py#L187\r\n\r\nTo show the exact lims, you have to change `deltas` to, for example, `0 * (maxs - mins) / 12.`\r\n\r\nYou need something to set exact lims without touching the inside of matplotlib.\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nfrom mpl_toolkits.mplot3d import Axes3D\r\nimport matplotlib.pyplot as plt\r\nfig = plt.figure()\r\nax = fig.gca(projection = '3d')\r\nax.set_xlim(0,0.8)\r\nplt.show()\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\r\n**Matplotlib version**\r\n * Operating system:macOS 10.14.6\r\n * Matplotlib version: 3.1.1\r\n * Python version: 3.7.4\r\n\r\nThe problem was discussed many times in STACK OVERFLOW:\r\nhttps://stackoverflow.com/questions/23951230/python-axis-limit-in-matplotlib\r\nhttps://stackoverflow.com/questions/46380464/matplotlib-3d-axis-bounds-always-too-large-doesnt-set-lims-correctly\r\nhttps://stackoverflow.com/questions/16488182/removing-axes-margins-in-3d-plot","author":{"url":"https://github.com/ultimatile","@type":"Person","name":"ultimatile"},"datePublished":"2020-07-24T18:52:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/18052/matplotlib/issues/18052"}
| 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:b983f62b-ea4b-c240-a74c-d969672ddce1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EA44:9EC5C:90F616:D08088:6A549B30 |
| html-safe-nonce | 332681f579e3f37eccf9ba965c50d8c772ef8a898f9bdc8e1f7b68c979f3b9e0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTQ0OjlFQzVDOjkwRjYxNjpEMDgwODg6NkE1NDlCMzAiLCJ2aXNpdG9yX2lkIjoiNTc3MDM0NTYwNTQyMDU4NzgyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 39b098bb0eba974a4399911e90cd4221b5243247940f0aec4b81766ed64446b3 |
| hovercard-subject-tag | issue:665353501 |
| 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/18052/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7f44d2d0ee3fc9e1d81dae2a70b11286e26ce16fab17b7a76c97be4bd0b08c7e/matplotlib/matplotlib/issues/18052 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7f44d2d0ee3fc9e1d81dae2a70b11286e26ce16fab17b7a76c97be4bd0b08c7e/matplotlib/matplotlib/issues/18052 |
| og:image:alt | I take an example from https://stackoverflow.com/questions/23951230/python-axis-limit-in-matplotlib In mplot3d, when you set, for example, set_xlim(0, 0.8), the outcome has an extra like set_xlim(0... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ultimatile |
| 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 | f8cfff6384f62259baea531c7f58bc7040f8dd92 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width