Title: Add a colorbar() method to ScalarMappable? · Issue #25880 · matplotlib/matplotlib · GitHub
Open Graph Title: Add a colorbar() method to ScalarMappable? · Issue #25880 · matplotlib/matplotlib
X Title: Add a colorbar() method to ScalarMappable? · Issue #25880 · matplotlib/matplotlib
Description: Sorry to slightly hijack the thread here, but I think this may be a good opportunity to discuss whether colorbar() could rather be a method on the ScalarMappable rather than on the Figure (we can always keep figure.colorbar(...) availabl...
Open Graph Description: Sorry to slightly hijack the thread here, but I think this may be a good opportunity to discuss whether colorbar() could rather be a method on the ScalarMappable rather than on the Figure (we can a...
X Description: Sorry to slightly hijack the thread here, but I think this may be a good opportunity to discuss whether colorbar() could rather be a method on the ScalarMappable rather than on the Figure (we can a...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/25880
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add a colorbar() method to ScalarMappable?","articleBody":" \r\nSorry to slightly hijack the thread here, but I think this may be a good opportunity to discuss whether\r\ncolorbar() could rather be a method on the ScalarMappable rather than on the Figure (we can always keep \r\nfigure.colorbar(...) available \"forever\", of course, for backcompat).\r\nIndeed, in an call like `fig.colorbar(mappable)` or `fig.colorbar(mappable, ax=...)` or `fig.colorbar(mappable, cax=...)`, \r\nfig *plays no role at all* (\\*): the axes where the colorbar ends up is entirely determined by the mappable's axes (or by the ax \r\nkwarg, or the cax kwarg.\r\n\r\n(\\*) Actually I lied a bit: we currently check whether there's a layout engine on fig (but that actually seems more like a bug; we should really check that on mappable.axes.figure).\r\n\r\n_Originally posted by @anntzer in https://github.com/matplotlib/matplotlib/issues/25871#issuecomment-1546358063_\r\n ","author":{"url":"https://github.com/greglucas","@type":"Person","name":"greglucas"},"datePublished":"2023-05-13T03:10:29.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":24},"url":"https://github.com/25880/matplotlib/issues/25880"}
| 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:72cb2db3-7a9a-eca6-59e7-9635f95afb5a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E03A:130837:1192E5E:17E348F:6A5215A5 |
| html-safe-nonce | fc540b901441eece8b0baf88734e3d9c4c4be2709ecb8de22834a9349e8e6547 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDNBOjEzMDgzNzoxMTkyRTVFOjE3RTM0OEY6NkE1MjE1QTUiLCJ2aXNpdG9yX2lkIjoiNzQ1ODcwODY2OTc5NjA2MjYyOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d33df2d46e0dc556bd42410ac6a440d86bb10e93f5b40a35cf25123bafd82c82 |
| hovercard-subject-tag | issue:1708408685 |
| 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/25880/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4977d4285a330f97586326c13612b759f91e48bcbbe0c7d89d58ffd0c246034f/matplotlib/matplotlib/issues/25880 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4977d4285a330f97586326c13612b759f91e48bcbbe0c7d89d58ffd0c246034f/matplotlib/matplotlib/issues/25880 |
| og:image:alt | Sorry to slightly hijack the thread here, but I think this may be a good opportunity to discuss whether colorbar() could rather be a method on the ScalarMappable rather than on the Figure (we can a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | greglucas |
| 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