Title: Added the from_levels_and_colors function. by pelson · Pull Request #2050 · matplotlib/matplotlib · GitHub
Open Graph Title: Added the from_levels_and_colors function. by pelson · Pull Request #2050 · matplotlib/matplotlib
X Title: Added the from_levels_and_colors function. by pelson · Pull Request #2050 · matplotlib/matplotlib
Description: This PR adds a function which simplifies the construction of a cmap and norm for discrete levels with specific colours. The interface is intentionally similar to the contourf levels and colors arguments - though a little stricter in the fact that the correct number of colors for levels is required. This has come up a couple of times with my colleagues and I always end up having to write a chunk of test code to make sure I've done it right. This function generally makes this easier - and will hopefully make doing quantized pcolormesh's less error prone.
Open Graph Description: This PR adds a function which simplifies the construction of a cmap and norm for discrete levels with specific colours. The interface is intentionally similar to the contourf levels and colors argu...
X Description: This PR adds a function which simplifies the construction of a cmap and norm for discrete levels with specific colours. The interface is intentionally similar to the contourf levels and colors argu...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/2050
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:5629f11e-deac-f5d4-d7c6-b1cd3f6fd5c7 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8BE0:3DC17:E71F0C:13EF6A8:6A53B434 |
| html-safe-nonce | dcf02e1ba8e44c4c9dd620eb6830681dc47296662dfd7af056c9b85a942efbf0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QkUwOjNEQzE3OkU3MUYwQzoxM0VGNkE4OjZBNTNCNDM0IiwidmlzaXRvcl9pZCI6IjkyMjE1NjUxMjc1OTIzMTU0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4a4fd2e4243c0f84f53f74806e8bab4bfb5875776b1383c1834c164f3e58f127 |
| hovercard-subject-tag | pull_request:5862728 |
| 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/2050/files |
| twitter:image | https://avatars.githubusercontent.com/u/810663?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/810663?s=400&v=4 |
| og:image:alt | This PR adds a function which simplifies the construction of a cmap and norm for discrete levels with specific colours. The interface is intentionally similar to the contourf levels and colors argu... |
| 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