Title: [Bug]: 3D artist clipbox cuts off data sooner than axis panes/spines/etc · Issue #23450 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: 3D artist clipbox cuts off data sooner than axis panes/spines/etc · Issue #23450 · matplotlib/matplotlib
X Title: [Bug]: 3D artist clipbox cuts off data sooner than axis panes/spines/etc · Issue #23450 · matplotlib/matplotlib
Description: Bug summary When enlarging 3D plots with ax.set_box_aspect(None, zoom=zoom), there is a mismatch between the limits of rendering data and the axis planes. These should be aligned. Code for reproduction import matplotlib.pyplot as plt imp...
Open Graph Description: Bug summary When enlarging 3D plots with ax.set_box_aspect(None, zoom=zoom), there is a mismatch between the limits of rendering data and the axis planes. These should be aligned. Code for reproduc...
X Description: Bug summary When enlarging 3D plots with ax.set_box_aspect(None, zoom=zoom), there is a mismatch between the limits of rendering data and the axis planes. These should be aligned. Code for reproduc...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/23450
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: 3D artist clipbox cuts off data sooner than axis panes/spines/etc","articleBody":"### Bug summary\n\nWhen enlarging 3D plots with `ax.set_box_aspect(None, zoom=zoom)`, there is a mismatch between the limits of rendering data and the axis planes. These should be aligned.\n\n### Code for reproduction\n\n```python\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom itertools import product, combinations\n\nfig, ax = plt.subplots(1, 1, subplot_kw={'projection': '3d'})\n\nr = [0, 1]\nscale = np.array([1, 1, 2])\n# Draw rectangular cuboid with side lengths [1, 1, 2]\nfor start, end in combinations(np.array(list(product(r, r, r))), 2):\n if np.sum(np.abs(start - end)) == r[1] - r[0]:\n ax.plot3D(*zip(start*scale, end*scale))\n\nax.view_init(elev=7, azim=35, roll=45)\nax.set_box_aspect(None, zoom=1.25)\nax.set_proj_type('ortho')\nax.set_xlabel('x')\nax.set_ylabel('y')\nax.set_zlabel('z')\n```\n\n\n### Actual outcome\n\n\n\n\n### Expected outcome\n\nI would expect either the corners of the plotted box to be included, or the corners of the axis planes to be cut off. Ideally the first one.\n\n### Additional information\n\nStackoverflow with the same issue: https://stackoverflow.com/questions/74733826/matplotlib-invisible-margins-cutting-off-3d-plot-data\n\n### Operating system\n\n_No response_\n\n### Matplotlib Version\n\n3.6.0.dev2960+g51ce6776b1\n\n### Matplotlib Backend\n\n_No response_\n\n### Python version\n\n_No response_\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\n_No response_","author":{"url":"https://github.com/scottshambaugh","@type":"Person","name":"scottshambaugh"},"datePublished":"2022-07-19T23:07:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/23450/matplotlib/issues/23450"}
| 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:dec3b6e8-344c-9df1-9641-8d1ab9f278ca |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9C4C:2F8BFC:114E7B9:1719E50:6A51C540 |
| html-safe-nonce | f43d3ae9aaf3f0ecca73fa085b0cc0cf506fb6ecf52fc6c38cea27b6305efa65 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QzRDOjJGOEJGQzoxMTRFN0I5OjE3MTlFNTA6NkE1MUM1NDAiLCJ2aXNpdG9yX2lkIjoiMzU0NzcyOTUxNDY5MDg4OTAyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 560098b7ceb8b99ebb29df8b9ae3d0035f72a6dbf3df78591ba983892686d40c |
| hovercard-subject-tag | issue:1310179373 |
| 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/23450/issue_layout |
| twitter:image | https://opengraph.githubassets.com/235cc340216c3f587e555d1eccf093ade72153a46cbaec3ba0a2dcfb062ad4db/matplotlib/matplotlib/issues/23450 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/235cc340216c3f587e555d1eccf093ade72153a46cbaec3ba0a2dcfb062ad4db/matplotlib/matplotlib/issues/23450 |
| og:image:alt | Bug summary When enlarging 3D plots with ax.set_box_aspect(None, zoom=zoom), there is a mismatch between the limits of rendering data and the axis planes. These should be aligned. Code for reproduc... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | scottshambaugh |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width