Title: [ENH]: do_3d_projection could restore original verts order after draw() finishes · Issue #23155 · matplotlib/matplotlib · GitHub
Open Graph Title: [ENH]: do_3d_projection could restore original verts order after draw() finishes · Issue #23155 · matplotlib/matplotlib
X Title: [ENH]: do_3d_projection could restore original verts order after draw() finishes · Issue #23155 · matplotlib/matplotlib
Description: Problem do_3d_projection() reorders vertices of various 3D collection artists in z-depth. Once the drawing is done, it would be useful to restore back the original order, so that e.g. interactive tools (mplcursors) reporting the index of...
Open Graph Description: Problem do_3d_projection() reorders vertices of various 3D collection artists in z-depth. Once the drawing is done, it would be useful to restore back the original order, so that e.g. interactive t...
X Description: Problem do_3d_projection() reorders vertices of various 3D collection artists in z-depth. Once the drawing is done, it would be useful to restore back the original order, so that e.g. interactive t...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/23155
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ENH]: do_3d_projection could restore original verts order after draw() finishes","articleBody":"### Problem\r\n\r\ndo_3d_projection() reorders vertices of various 3D collection artists in z-depth. Once the drawing is done, it would be useful to restore back the original order, so that e.g. interactive tools (mplcursors) reporting the index of a picked collection member get the original index as set by the user (https://github.com/anntzer/mplcursors/issues/49). This should be reasonably cheap to do as we can probably just stash the original arrays somewhere and restore them as attributes at the end.\r\n\r\nIn practice, this probably means adding another API like `doing_3d_projection()` which returns a contextmanager (or letting `do_3d_projection()` possibly return a contextmanager and doing a typecheck on that) and replacing the calls to `do_3d_projection()` to `stack.enter_context(artist.doing_3d_projection())` where `stack = ExitStack()` is defined at the top of `Axes3D.draw()`.\r\n\r\n### Proposed solution\r\n\r\n_No response_","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2022-05-27T12:46:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/23155/matplotlib/issues/23155"}
| 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:b71bd7d8-8dc6-b058-7554-5bb448a71ba1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9B10:4342D:1DFD693:27B9475:6A52D703 |
| html-safe-nonce | 86064b7c3a5f537f8c5643dbacc53f2a465ce7db06066c43031315d0ca8e0457 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjEwOjQzNDJEOjFERkQ2OTM6MjdCOTQ3NTo2QTUyRDcwMyIsInZpc2l0b3JfaWQiOiIxOTQ4MDYzNDA5MDgyOTE0NTYzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 99be3d509a6cc75db7f3fa4d3914d3e62d3f1a7bb4217a97871f8f6b822f55bc |
| hovercard-subject-tag | issue:1250728841 |
| 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/23155/issue_layout |
| twitter:image | https://opengraph.githubassets.com/27271c0edf7d58e0e86d03c3016cf86d4dc8323522ef782d8f08b53de85a3025/matplotlib/matplotlib/issues/23155 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/27271c0edf7d58e0e86d03c3016cf86d4dc8323522ef782d8f08b53de85a3025/matplotlib/matplotlib/issues/23155 |
| og:image:alt | Problem do_3d_projection() reorders vertices of various 3D collection artists in z-depth. Once the drawing is done, it would be useful to restore back the original order, so that e.g. interactive t... |
| 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 | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width