Title: BUG: Convert qualitative colormaps to ListedColormap by endolith · Pull Request #3973 · matplotlib/matplotlib · GitHub
Open Graph Title: BUG: Convert qualitative colormaps to ListedColormap by endolith · Pull Request #3973 · matplotlib/matplotlib
X Title: BUG: Convert qualitative colormaps to ListedColormap by endolith · Pull Request #3973 · matplotlib/matplotlib
Description: "Qualitative" colormaps are designed to be used on things like chloropleths, not smoothly-varying heatmaps, in applications such as scipy.ndimage.measurements.label. It would be nice to have some predefined named maps for this purpose. ColorBrewer has some (Accent, Dark2, Paired, Pastel1, Pastel2, Set1, Set2, Set3) but they were mistakenly created as LinearSegmentedColormap when they should have been ListedColormap, so I converted them. I left these colormaps in the same _cm.py file and "tagged" them with a dictionary and hacked in a path for them to be implemented as ListedColormap. This is hacky and I expect you to reject it, but I don't know of a better way right now. Please suggest a more proper way to implement this, moving them to their own file, etc. In #881 there was concern that this would cause backward compatibility problems, but this won't actually "break" any existing code that uses them, they can still be used for heatmaps, the images will just become solid colors instead: They're pretty ugly when used as heatmaps, so I doubt they are being used this way very often.
Open Graph Description: "Qualitative" colormaps are designed to be used on things like chloropleths, not smoothly-varying heatmaps, in applications such as scipy.ndimage.measurements.label. It would be nice to ...
X Description: "Qualitative" colormaps are designed to be used on things like chloropleths, not smoothly-varying heatmaps, in applications such as scipy.ndimage.measurements.label. It would be ...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/3973
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:143976a3-5141-64dc-a88b-ed41de91db12 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CDBE:2180CA:124E905:1863D70:6A5428C7 |
| html-safe-nonce | 75591a8ee1b9da103e6970cc9c4d22cf0975a8612474d70c9a648d198b8f93d2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDREJFOjIxODBDQToxMjRFOTA1OjE4NjNENzA6NkE1NDI4QzciLCJ2aXNpdG9yX2lkIjoiMTA5MTI1OTExMTg5MzY0MTQxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | de718abdc6f99627e882eb32326372ce23fa072a3e098a67ab9d4707f5f2008c |
| hovercard-subject-tag | pull_request:26936293 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/matplotlib/matplotlib/pull/3973/files |
| twitter:image | https://avatars.githubusercontent.com/u/58611?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/58611?s=400&v=4 |
| og:image:alt | "Qualitative" colormaps are designed to be used on things like chloropleths, not smoothly-varying heatmaps, in applications such as scipy.ndimage.measurements.label. It would be nice to ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| 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