Title: [ENH]: scalermappable bar · Issue #26312 · matplotlib/matplotlib · GitHub
Open Graph Title: [ENH]: scalermappable bar · Issue #26312 · matplotlib/matplotlib
X Title: [ENH]: scalermappable bar · Issue #26312 · matplotlib/matplotlib
Description: Problem Coloring the bars in the bar chart based on some value isn't uncommon (#23265, #26310) and colors=cmap(norm(values)) is serviceable but it'd be nice if folks could directly set the cmap, norm, and data separately-especially for l...
Open Graph Description: Problem Coloring the bars in the bar chart based on some value isn't uncommon (#23265, #26310) and colors=cmap(norm(values)) is serviceable but it'd be nice if folks could directly set the cmap, no...
X Description: Problem Coloring the bars in the bar chart based on some value isn't uncommon (#23265, #26310) and colors=cmap(norm(values)) is serviceable but it'd be nice if folks could directly set the ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/26312
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ENH]: scalermappable bar","articleBody":"### Problem\r\n\r\nColoring the bars in the bar chart based on some value isn't uncommon (#23265, #26310) and `colors=cmap(norm(values))` is serviceable but it'd be nice if folks could directly set the cmap, norm, and data separately-especially for legend and colorbar creation. \r\n\r\n### Proposed solution\r\n\r\nWhile it has it's problems, scatter has an API for how to manage colormap/norm or colors for discrete markers, so I think it would stay consistent if the scatter API for colors could be ported to bars. Could then probably adapt [scatter.legend_elements](https://matplotlib.org/devdocs/gallery/lines_bars_and_markers/scatter_with_legend.html#automated-legend-creation) implementation to auto generate legends from the colors. \r\n\r\nETA: If we did this, it'd probably also be a good reason to implement #7383 ","author":{"url":"https://github.com/story645","@type":"Person","name":"story645"},"datePublished":"2023-07-14T21:08:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/26312/matplotlib/issues/26312"}
| 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:ea8f0bc8-df3e-69ea-64cb-6065ed2cc78e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B9BC:2FB335:E4A146:132F3A3:6A52917F |
| html-safe-nonce | 5a07e08b333609efa1132b4fc832f6bafd713d7ba77023f8be15cef18b16a0e7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOUJDOjJGQjMzNTpFNEExNDY6MTMyRjNBMzo2QTUyOTE3RiIsInZpc2l0b3JfaWQiOiIxOTgzODQ2MDQ4NjQxMjI1MDg3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 25d6d39ebf28bac6caab502b661a975fd5a135f0d8cf5e4d2cf370d2d17b0b49 |
| hovercard-subject-tag | issue:1805582169 |
| 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/26312/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e2259e777ade37170ab4a024b5f8e04f42e716c3f1ee7e2b0cfe4852bcac1185/matplotlib/matplotlib/issues/26312 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e2259e777ade37170ab4a024b5f8e04f42e716c3f1ee7e2b0cfe4852bcac1185/matplotlib/matplotlib/issues/26312 |
| og:image:alt | Problem Coloring the bars in the bar chart based on some value isn't uncommon (#23265, #26310) and colors=cmap(norm(values)) is serviceable but it'd be nice if folks could directly set the cmap, no... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | story645 |
| 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