Title: [Bug]: Surface draws incorrectly after set_verts on Poly3DCollection · Issue #21163 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Surface draws incorrectly after set_verts on Poly3DCollection · Issue #21163 · matplotlib/matplotlib
X Title: [Bug]: Surface draws incorrectly after set_verts on Poly3DCollection · Issue #21163 · matplotlib/matplotlib
Description: Bug summary Surface is not rendered properly after changing the data using set_verts: the simple MWE below shows the effect. Code for reproduction import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animatio...
Open Graph Description: Bug summary Surface is not rendered properly after changing the data using set_verts: the simple MWE below shows the effect. Code for reproduction import numpy as np import matplotlib.pyplot as plt...
X Description: Bug summary Surface is not rendered properly after changing the data using set_verts: the simple MWE below shows the effect. Code for reproduction import numpy as np import matplotlib.pyplot as plt...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/21163
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Surface draws incorrectly after set_verts on Poly3DCollection ","articleBody":"### Bug summary\n\nSurface is not rendered properly after changing the data using `set_verts`: the simple MWE below shows the effect.\n\n### Code for reproduction\n\n```python\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib.animation as animation\r\n\r\nx = np.array([10, -10])\r\ny = np.array([25, -25])\r\nz = 5\r\n\r\nX, Y = np.meshgrid(x, y)\r\nZ = z * np.ones_like(X)\r\n\r\nfig = plt.figure(figsize=(8, 4.5))\r\nax = fig.add_subplot(projection=\"3d\")\r\n\r\nax.axes.set_xlim3d(left=-15, right=15)\r\nax.axes.set_ylim3d(bottom=-30, top=30)\r\nax.axes.set_zlim3d(bottom=0, top=10)\r\n\r\nsurf = ax.plot_surface(X, Y, Z, color=\"r\", alpha=0.3)\r\nplt.pause(1.0)\r\n\r\ntime = np.linspace(0, 5, 101)\r\nfor t in time:\r\n zt = z + 2 * np.sin(2 * np.pi * t)\r\n Z = zt * np.ones_like(X)\r\n verts = np.array([X, Y, Z]).T.reshape(4, 3)\r\n surf.set_verts(verts)\r\n plt.pause(0.1)\n```\n\n\n### Actual outcome\n\n\r\n\n\n### Expected outcome\n\nThe full surface, as is shown prior to updating using `set_verts` should be shown:\r\n\r\n\r\n\n\n### Operating system\n\nUbuntu 21.04\n\n### Matplotlib Version\n\n3.4.2\n\n### Matplotlib Backend\n\nQt5Agg\n\n### Python version\n\n3.8.11\n\n### Jupyter version\n\n_No response_\n\n### Other libraries\n\n_No response_\n\n### Installation\n\nconda\n\n### Conda channel\n\n_No response_","author":{"url":"https://github.com/ccaprani","@type":"Person","name":"ccaprani"},"datePublished":"2021-09-24T05:10:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/21163/matplotlib/issues/21163"}
| 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:a9f77e30-ca02-7732-a66e-297c3257e174 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C48E:199219:1B7814A:24339C8:6A51DBBE |
| html-safe-nonce | b83efcdb020aab47d45c9b0fa02c31f76e6af9298c75ab2d9c4e33f6d9aa4576 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDhFOjE5OTIxOToxQjc4MTRBOjI0MzM5Qzg6NkE1MURCQkUiLCJ2aXNpdG9yX2lkIjoiNzA5OTUzMTM1NjY3NDMxNzI0NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9b95dc8f110b763408a0e4ba46f7a23fd08396f403250a357c2ae9507bae5302 |
| hovercard-subject-tag | issue:1006086647 |
| 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/21163/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cd21507aa1d77de9617da3e0cb4ccdd9c56761b165d2529d4515d2c8efd0f5be/matplotlib/matplotlib/issues/21163 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cd21507aa1d77de9617da3e0cb4ccdd9c56761b165d2529d4515d2c8efd0f5be/matplotlib/matplotlib/issues/21163 |
| og:image:alt | Bug summary Surface is not rendered properly after changing the data using set_verts: the simple MWE below shows the effect. Code for reproduction import numpy as np import matplotlib.pyplot as plt... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ccaprani |
| 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