Title: Implement full 3D box clipping by QuLogic · Pull Request #30553 · matplotlib/matplotlib · GitHub
Open Graph Title: Implement full 3D box clipping by QuLogic · Pull Request #30553 · matplotlib/matplotlib
X Title: Implement full 3D box clipping by QuLogic · Pull Request #30553 · matplotlib/matplotlib
Description: PR summary Based on @scottshambaugh's comment, I took the existing 2D clipping algorithm and extended it to 3D. That turned out to be quite straightforward as it already worked on each direction independently. Most of the work was actually with regards to the plumbing to get things in and out. Then I implemented it for Poly3DCollection and Patch3D. There are still a few things to finish this: Poly3DCollection supports masking on the input, both from the original input and also to allow combining ragged input into a single array for quicker processing. I have not tested either, and don't expect them to work properly. The 2D code drops any empty polygons after clipping. In 3D, this breaks depth shading since the order is broken. Instead of trying to track this change through clipping, it's probably easiest just to keep the empty polygons, but I have not tested it out. This is still under the axlim_clip flag; I don't know if we just want to enable this all the time and/or deprecate that option. Probably could warrant an API/what's new note. Using the example from #8902 without clipping, the bars are quite misleading, as it seems like they are in a completely different spot initially compared to when looking at them edgewise. Screencast.From.2025-09-12.05-24-46.mp4 whereas with clipping here, we get something that isn't so weird: Screencast.From.2025-09-12.05-25-33.mp4 This is based on #30208. PR checklist "closes #0000" is in the body of the PR description to link the related issue new and changed code is tested Plotting related features are demonstrated in an example New Features and API Changes are noted with a directive and release note Documentation complies with general and docstring guidelines
Open Graph Description: PR summary Based on @scottshambaugh's comment, I took the existing 2D clipping algorithm and extended it to 3D. That turned out to be quite straightforward as it already worked on each directio...
X Description: PR summary Based on @scottshambaugh's comment, I took the existing 2D clipping algorithm and extended it to 3D. That turned out to be quite straightforward as it already worked on each dire...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/30553
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:1eacd249-c730-7153-c6eb-b99710ed454a |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AFC0:22C726:F173A8:141A065:6A51BE9E |
| html-safe-nonce | f60ddeada100c078faf7c3a2340a385d47ea87975e70a900c9c338b129df8393 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRkMwOjIyQzcyNjpGMTczQTg6MTQxQTA2NTo2QTUxQkU5RSIsInZpc2l0b3JfaWQiOiI4MzIyNDU5MTYxNzU4NjQ1OTE4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4a71fb5e184585bf37cc7a2a6c23fa72cf6a4e7faf36c52cbe14c85d1bd3a0b1 |
| hovercard-subject-tag | pull_request:2824128730 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/matplotlib/matplotlib/pull/30553/files |
| twitter:image | https://avatars.githubusercontent.com/u/302469?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/302469?s=400&v=4 |
| og:image:alt | PR summary Based on @scottshambaugh's comment, I took the existing 2D clipping algorithm and extended it to 3D. That turned out to be quite straightforward as it already worked on each directio... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| 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