Title: [MNT]: Colormap refactoring · Issue #29141 · matplotlib/matplotlib · GitHub
Open Graph Title: [MNT]: Colormap refactoring · Issue #29141 · matplotlib/matplotlib
X Title: [MNT]: Colormap refactoring · Issue #29141 · matplotlib/matplotlib
Description: Summary This is a collection of topics on colormaps to improve the API and also to eventually make colormaps immutable. Tasks Deprecate parameter ListedColormap(..., N=...) It's beyond the scope of ListedColormap to post-process the give...
Open Graph Description: Summary This is a collection of topics on colormaps to improve the API and also to eventually make colormaps immutable. Tasks Deprecate parameter ListedColormap(..., N=...) It's beyond the scope of...
X Description: Summary This is a collection of topics on colormaps to improve the API and also to eventually make colormaps immutable. Tasks Deprecate parameter ListedColormap(..., N=...) It's beyond the scop...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/29141
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[MNT]: Colormap refactoring","articleBody":"### Summary\n\nThis is a collection of topics on colormaps to improve the API and also to eventually make colormaps immutable.\n\n### Tasks\n\n- [x] Deprecate parameter `ListedColormap(..., N=...)`\n It's beyond the scope of `ListedColormap` to post-process the given list of colors. \n PR: #29135\n- [x] Narrow the type of the colors parameter to `ListedColormap` to a sequence, i.e. no single colors https://github.com/matplotlib/matplotlib/issues/28763#issuecomment-2319169328\n PR: Implicitly via #29135, because a single color has only worked when also passing `N`.\n- [x] Fix `ListedColormap.monochrome` attribute #28763 \n PR: #29125\n- [x] Add add `over`, `under`, `bad` kwargs to constructor, so that one doesn't have to write `ListedColormap(...).with_extremes(...)` \n PR: #29460\n- [ ] Deprecate `set_over()`, `set_under()`, `set_bad()`\n PR: #30531 \n- [x] Change default name of `ListedColormap` \"from_list\" to \"\"\n PR: #30532 \n- [ ] Separate the APIs for mapping [0, 1] -\u003e color (currently `__call__(float)`) from lut-element access (currently `__call__(int)`), because `cmap(1)` and `cmap(1.0)` giving different results is surprising #28198\n *Suggestion*: Replace `BoundaryNorm` https://github.com/matplotlib/matplotlib/issues/21911#issuecomment-3276419772, which will remove the need for indexing through `__call__`. Maybe create another way to index into a colormap's lut, in case some users need that functionality.\n- [ ] Decide whether we can better handle lookup tables resolution for `LinearSegmentedColormap`\n and possibly deprecated `rcParams['image.lut']` - globally tuning that parameter seems unreasonable\n and error-prone\n\n\n\n\n","author":{"url":"https://github.com/timhoffm","@type":"Person","name":"timhoffm"},"datePublished":"2024-11-14T14:53:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/29141/matplotlib/issues/29141"}
| 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:2beab526-c5af-121a-fee4-b1baec074938 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C810:19730C:477078:60A6B8:6A51C553 |
| html-safe-nonce | 15ca8a693261ed482ee7f86680e9534900ea5fa67e4b9ed1eabbffa6ad8e8e35 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODEwOjE5NzMwQzo0NzcwNzg6NjBBNkI4OjZBNTFDNTUzIiwidmlzaXRvcl9pZCI6IjM1MjI0MzU0ODU5MTcxMDM0NDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b96f8799ee67946f9ddafb6271d8140f12563d89e2110e587c7d39ffa3845982 |
| hovercard-subject-tag | issue:2659080420 |
| 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/29141/issue_layout |
| twitter:image | https://opengraph.githubassets.com/897b7ce211b77ca6289fafc5157320c8f78699cc58004007f345e2e694cb00db/matplotlib/matplotlib/issues/29141 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/897b7ce211b77ca6289fafc5157320c8f78699cc58004007f345e2e694cb00db/matplotlib/matplotlib/issues/29141 |
| og:image:alt | Summary This is a collection of topics on colormaps to improve the API and also to eventually make colormaps immutable. Tasks Deprecate parameter ListedColormap(..., N=...) It's beyond the scope of... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | timhoffm |
| 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