Title: Color maps from function · Issue #19258 · matplotlib/matplotlib · GitHub
Open Graph Title: Color maps from function · Issue #19258 · matplotlib/matplotlib
X Title: Color maps from function · Issue #19258 · matplotlib/matplotlib
Description: Problem Would be nice if we could just pass a function as a cmap, and matplotlib would just query it to get a color from a value. example of usage: from colorsys import hsl_to_rgb import matplotlib.pyplot as plt y = ... # some data for a...
Open Graph Description: Problem Would be nice if we could just pass a function as a cmap, and matplotlib would just query it to get a color from a value. example of usage: from colorsys import hsl_to_rgb import matplotlib...
X Description: Problem Would be nice if we could just pass a function as a cmap, and matplotlib would just query it to get a color from a value. example of usage: from colorsys import hsl_to_rgb import matplotlib...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/19258
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Color maps from function","articleBody":"### Problem\r\n\r\nWould be nice if we could just pass a function as a cmap, and matplotlib would just query it to get a color from a value.\r\n\r\nexample of usage:\r\n```python\r\nfrom colorsys import hsl_to_rgb\r\nimport matplotlib.pyplot as plt\r\n\r\ny = ... # some data for an histogram\r\ncmap = lambda x: hsl_to_rgb(x, .9, .5)**2\r\nplt.hist(y, cmap=cmap)\r\n```\r\n\r\n### Proposed Solution\r\n\r\nI don't know how realistic this is but I've just never seen it even suggested when googling. \r\nIt certainly feels reasonable to me but I can't tell because I don't know much about the implementation. \r\nIf this is not feasible at least this would set a record for future google queries...","author":{"url":"https://github.com/Inspirateur","@type":"Person","name":"Inspirateur"},"datePublished":"2021-01-08T08:47:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/19258/matplotlib/issues/19258"}
| 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:e43bff15-f495-de21-124c-fe24206ffad7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A04E:29DE49:A694BE:DD3675:6A527E28 |
| html-safe-nonce | 4d79b3d8f098a992dc458c198214d76c49bbe553b89c28d55008089937a0289a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDRFOjI5REU0OTpBNjk0QkU6REQzNjc1OjZBNTI3RTI4IiwidmlzaXRvcl9pZCI6IjkxMjAxMjU3NjIxOTE2NTQ0NDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | dc265c4637cac56f3ec3f110e73d6ee869d3193e06d04aa50524726b4b7bc075 |
| hovercard-subject-tag | issue:781954225 |
| 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/19258/issue_layout |
| twitter:image | https://opengraph.githubassets.com/239ce3d1b95b26d770518e0e07a238d89b3a793a7d50d4e36eb2d756808df695/matplotlib/matplotlib/issues/19258 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/239ce3d1b95b26d770518e0e07a238d89b3a793a7d50d4e36eb2d756808df695/matplotlib/matplotlib/issues/19258 |
| og:image:alt | Problem Would be nice if we could just pass a function as a cmap, and matplotlib would just query it to get a color from a value. example of usage: from colorsys import hsl_to_rgb import matplotlib... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Inspirateur |
| 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