Title: ColorbarAxes is an imperfect proxy for the Axes passed to Colorbar · Issue #20479 · matplotlib/matplotlib · GitHub
Open Graph Title: ColorbarAxes is an imperfect proxy for the Axes passed to Colorbar · Issue #20479 · matplotlib/matplotlib
X Title: ColorbarAxes is an imperfect proxy for the Axes passed to Colorbar · Issue #20479 · matplotlib/matplotlib
Description: Bug report Bug summary Before the refactor, one would set colorbar axes to be pickable with colorbar.ax.set_picker(True). Now, it is necessary to use the undocumented colorbar.ax.inner_ax.set_picker(True). Likewise, with motion notify ev...
Open Graph Description: Bug report Bug summary Before the refactor, one would set colorbar axes to be pickable with colorbar.ax.set_picker(True). Now, it is necessary to use the undocumented colorbar.ax.inner_ax.set_picke...
X Description: Bug report Bug summary Before the refactor, one would set colorbar axes to be pickable with colorbar.ax.set_picker(True). Now, it is necessary to use the undocumented colorbar.ax.inner_ax.set_picke...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/20479
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ColorbarAxes is an imperfect proxy for the Axes passed to Colorbar","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### Bug report\r\n\r\n**Bug summary**\r\n\r\nBefore the refactor, one would set colorbar axes to be pickable with `colorbar.ax.set_picker(True)`. Now, it is necessary to use the undocumented `colorbar.ax.inner_ax.set_picker(True)`. Likewise, with motion notify events, `MouseEvent.inaxes` is not `colorbar.ax` under any circumstances, it always is `colorbar.ax.inner_ax`.\r\n\r\nBut, this is not really about events so much as the fact that `Colorbar(ax).ax is ax == False` and all methods of `colorbar.ax` are actually bound to a different object, namely `colorbar.ax.inner_ax`, so they are acting on surprising, hidden state (from a user's perspective). \r\n\r\nWe could work around the events issue, but I feel like there would be an ongoing stream of bug reports without a comprehensive fix. On the other hand, I definitely don't want to revert `ColorbarAxes` entirely because I *really* like the improvements that it enabled.\r\n\r\n**Code for reproduction**\r\n\r\nPlease see #20471, which this issue blocks (in my opinion).\r\n\r\n\r\n**Matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system: Win10\r\n * Matplotlib version (`import matplotlib; print(matplotlib.__version__)`): master\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): tkagg\r\n * Python version: 3.8.8\r\n * Jupyter version (if applicable): \r\n * Other libraries: \r\n\r\n\u003c!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--\u003e\r\n\u003c!--If you installed from conda, please specify which channel you used if not the default--\u003e\r\n\r\ncc @jklymak ","author":{"url":"https://github.com/richardsheridan","@type":"Person","name":"richardsheridan"},"datePublished":"2021-06-22T00:50:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/20479/matplotlib/issues/20479"}
| 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:dc780704-c4d7-92c5-d2d6-9221e1e9c00a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D37A:13B2CF:6C8C3A:92128A:6A51D3B0 |
| html-safe-nonce | 91d2dadedb2746f2b7264e9b22b92f2e7e78e74aaf2fb36b9483817bcd69faa3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzdBOjEzQjJDRjo2QzhDM0E6OTIxMjhBOjZBNTFEM0IwIiwidmlzaXRvcl9pZCI6IjYzNDQ2MDIyNDQ5MzIwMzE0MDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 17fff8c4b6f8121e2daf0e9682a9d63119d7a1b682c315c20dc0ed0778742bf8 |
| hovercard-subject-tag | issue:926722816 |
| 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/20479/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d3edc795d783642b13eb6027952237b70bb93961ac1e7c0e1d13376f3934f94c/matplotlib/matplotlib/issues/20479 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d3edc795d783642b13eb6027952237b70bb93961ac1e7c0e1d13376f3934f94c/matplotlib/matplotlib/issues/20479 |
| og:image:alt | Bug report Bug summary Before the refactor, one would set colorbar axes to be pickable with colorbar.ax.set_picker(True). Now, it is necessary to use the undocumented colorbar.ax.inner_ax.set_picke... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | richardsheridan |
| 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