Title: DOC: Document patch deprecation · Issue #20635 · matplotlib/matplotlib · GitHub
Open Graph Title: DOC: Document patch deprecation · Issue #20635 · matplotlib/matplotlib
X Title: DOC: Document patch deprecation · Issue #20635 · matplotlib/matplotlib
Description: Problem In #20481 colorbar.patch was deprecated, so doing for example (in our code that makes a DraggableColorbar): cbar.patch.figure.canvas.mpl_connect('button_press_event', on_press) Now yields: The patch attribute was deprecated in Ma...
Open Graph Description: Problem In #20481 colorbar.patch was deprecated, so doing for example (in our code that makes a DraggableColorbar): cbar.patch.figure.canvas.mpl_connect('button_press_event', on_press) Now yields: ...
X Description: Problem In #20481 colorbar.patch was deprecated, so doing for example (in our code that makes a DraggableColorbar): cbar.patch.figure.canvas.mpl_connect('button_press_event', on_press) Now ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/20635
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"DOC: Document patch deprecation","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Problem\r\n\r\nIn #20481 `colorbar.patch` was deprecated, so doing for example (in our code that [makes a DraggableColorbar](https://github.com/mne-tools/mne-python/blob/a8c197d47cb32d07b16cf8e257ff168b05d9fe1a/mne/viz/utils.py#L1241-L1252)):\r\n```\r\ncbar.patch.figure.canvas.mpl_connect('button_press_event', on_press)\r\n```\r\nNow yields:\r\n```\r\nThe patch attribute was deprecated in Matplotlib 3.5 and will be removed two minor releases later.\r\n```\r\n\r\n### Suggested Improvement\r\n\r\nIt would be good to know what other attribute to use instead of `cbar.patch` in order to do things like control interaction. It would be nice if the emitted warning and API notes were updated, but at least one or the other would help.","author":{"url":"https://github.com/larsoner","@type":"Person","name":"larsoner"},"datePublished":"2021-07-12T19:21:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/20635/matplotlib/issues/20635"}
| 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:fe29d954-8fa8-df90-2cf5-e749df006e27 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EDB8:276C72:2904778:37E3A83:6A53B970 |
| html-safe-nonce | 084bf8c344a31cdbac66f7812a831bf1865e5c5cdbb96bd9f11b4bd4751204e5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFREI4OjI3NkM3MjoyOTA0Nzc4OjM3RTNBODM6NkE1M0I5NzAiLCJ2aXNpdG9yX2lkIjoiMjU4NTUwNjgyNTc2OTMwMjM4NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a88c2d4ef2f290d15c275f97aaa6f16bc9e5691091d5727fddbbe4f843b97571 |
| hovercard-subject-tag | issue:942370532 |
| 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/20635/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7455e5ac136a0ba9e91fe03c7c7d7307eac6010128c7cc371f637315642462c2/matplotlib/matplotlib/issues/20635 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7455e5ac136a0ba9e91fe03c7c7d7307eac6010128c7cc371f637315642462c2/matplotlib/matplotlib/issues/20635 |
| og:image:alt | Problem In #20481 colorbar.patch was deprecated, so doing for example (in our code that makes a DraggableColorbar): cbar.patch.figure.canvas.mpl_connect('button_press_event', on_press) Now yields: ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | larsoner |
| 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