Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Deprecate ListedColormap(..., N=...) parameter#29135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Truncating or repeating the given colors to a specific value of Nis not within the scope of colormaps. Instead, users shouldcreate an appropriate color list themselves and feed that toListedColormap.Also the current behavior can be surprising: It may well be thata given N was intended to truncate, but depending on the list, itcould repeat. Repeated colors in a colormap are dangerous / oftennot intentended because they create an ambiguity in the color ->value mapping.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Ruth Comer <10599679+rcomer@users.noreply.github.com>
2fa9151
intomatplotlib:mainUh oh!
There was an error while loading.Please reload this page.
neutrinoceros commentedNov 26, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
while adapting cmyt to this change, I noticed that |
The effect / usage of
Therefore, there is no plan to discard |
thanks a lot for this detailed explanation ! |
Truncating or repeating the given colors to a specific value of N is not within the scope of colormaps. Instead, users should create an appropriate color list themselves and feed that to ListedColormap.
Also the current behavior can be surprising: It may well be that a given N was intended to truncate, but depending on the list, it could repeat. Repeated colors in a colormap are dangerous / often not intentended because they create an ambiguity in the color -> value mapping.