Title: [Bug]: Slow lasso selector over QuadMesh collection · Issue #22520 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Slow lasso selector over QuadMesh collection · Issue #22520 · matplotlib/matplotlib
X Title: [Bug]: Slow lasso selector over QuadMesh collection · Issue #22520 · matplotlib/matplotlib
Description: Bug summary When I create pcolormesh plot with big enough data, lasso selector (useblit=True) is redrawing very slowly. Don't have problem with this in version 3.4.2 Code for reproduction import numpy as np from matplotlib.widgets import...
Open Graph Description: Bug summary When I create pcolormesh plot with big enough data, lasso selector (useblit=True) is redrawing very slowly. Don't have problem with this in version 3.4.2 Code for reproduction import nu...
X Description: Bug summary When I create pcolormesh plot with big enough data, lasso selector (useblit=True) is redrawing very slowly. Don't have problem with this in version 3.4.2 Code for reproduction impor...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/22520
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Slow lasso selector over QuadMesh collection","articleBody":"### Bug summary\r\n\r\nWhen I create pcolormesh plot with big enough data, lasso selector (useblit=True) is redrawing very slowly. Don't have problem with this in version 3.4.2\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport numpy as np\r\nfrom matplotlib.widgets import LassoSelector\r\nimport matplotlib.pyplot as plt\r\n\r\nclass SelectFromCollection:\r\n def __init__(self, ax):\r\n self.lasso = LassoSelector(ax, onselect=self.onselect, useblit=True)\r\n def onselect(self, verts):\r\n pass\r\n\r\n\r\nif __name__ == '__main__':\r\n fig, ax = plt.subplots()\r\n\r\n np.random.seed(19680801)\r\n Z = np.random.rand(1095, 100)\r\n x = np.arange(-0.5, 100, 1) # len = 11\r\n y = np.arange(4.5, 1100, 1) # len = 7\r\n\r\n ax.pcolormesh(x, y, Z)\r\n # data2d = np.random.randint(0, 100,(1000,1000))\r\n # ax.imshow(data2d)\r\n selector = SelectFromCollection(ax)\r\n plt.show()\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\nSlow lasso drawing\r\n\r\n### Expected outcome\r\n\r\nQuick lasso drawing :)\r\n\r\n### Additional information\r\n\r\nIf imshow is used, lasso selector is acting normaly.\r\n\r\n### Operating system\r\n\r\nUbuntu 20.04\r\n\r\n### Matplotlib Version\r\n\r\n3.5.1\r\n\r\n### Matplotlib Backend\r\n\r\nQtAgg\r\n\r\n### Python version\r\n\r\n3.8\r\n\r\n### Jupyter version\r\n\r\n_No response_\r\n\r\n### Installation\r\n\r\n_No response_","author":{"url":"https://github.com/Stassels","@type":"Person","name":"Stassels"},"datePublished":"2022-02-21T14:36:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/22520/matplotlib/issues/22520"}
| 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:2d61d53f-8fe1-cf44-06c3-238dcfb0cca1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C356:2FBA0B:717B62:97FDBD:6A541875 |
| html-safe-nonce | 4013993375acfefa6001251d74e7f59db820be9bbbe808e1fbdb7f7bf33b1340 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzU2OjJGQkEwQjo3MTdCNjI6OTdGREJEOjZBNTQxODc1IiwidmlzaXRvcl9pZCI6Ijg2MTY3MTc0Njc1NTEwNjkzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d325240935c43ca5c2334d5c04c93b0c667e0d1405ff17882f88cbd0cb98727e |
| hovercard-subject-tag | issue:1145881896 |
| 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/22520/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e54ce28b5a67ae9c47df2bf8663a38556934820029e87faeb6dc1d3474ffe946/matplotlib/matplotlib/issues/22520 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e54ce28b5a67ae9c47df2bf8663a38556934820029e87faeb6dc1d3474ffe946/matplotlib/matplotlib/issues/22520 |
| og:image:alt | Bug summary When I create pcolormesh plot with big enough data, lasso selector (useblit=True) is redrawing very slowly. Don't have problem with this in version 3.4.2 Code for reproduction import nu... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Stassels |
| 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 | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width