Repository navigation
Api deprecate cmap functions - #23668
Conversation
greglucas
left a comment
There was a problem hiding this comment.
I will say, this looks like it will be noisy, but I think that it all makes everything much more explicit and readable IMO. So, overall I think it is a good direction.
07d80fd to
396c88c
Compare
418ee64 to
8f0c814
Compare
|
OK, really done force-pushing now... |
greglucas
left a comment
There was a problem hiding this comment.
👍 Good choice with the name of the private function, I think that is better.
| fig, ax = plt.subplots() | ||
| ax.contourf(x, y, z, 7, hatches=['/', '\\', '//', '-'], | ||
| cmap=plt.get_cmap('gray'), | ||
| cmap=mpl.colormaps['gray'], |
There was a problem hiding this comment.
Can we just use strings if we aren't using resample or using the Colormap for anything?
There was a problem hiding this comment.
It can, but I was just mechanically changing (a lot of this was done with search-and-relpace)
There was a problem hiding this comment.
I've decided to leave this. It makes the test a bit more complicated, but I do not know if we are definitely exercising the ability to pass Colormap objects through this top level API else where.
|
I'll try to get these changes in first thing tomorow morning, will not be offended if you want to push change @QuLogic . |
8f0c814 to
9321499
Compare
|
@timhoffm I think this is ready to review again. |
9321499 to
ae90168
Compare
e830ea7 to
093ee4a
Compare
- matplotlib.cm.get_cmap - matplotlib.cm.register_cmap - matplotlib.cm.unregister_cmap - matplotlib.pyplot.register_cmap in preference for working with the ColormapRegistry on the top level module. Co-authored-by: Greg Lucas <greg.m.lucas@gmail.com>
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
Add it to the rendered docs.
f51e784 to
a987e31
Compare
|
@timhoffm I think I got everything |
|
Anybody can merge when green. |
* Change deprecated MPL colormap registration - matplotlib/matplotlib#23668. * Adapt benchmark for importing palette to cope with MPL 3.6. * What's New entry. * What's New typo. * Reformat import_iris imports.
matplotlib.cm.get_cmap → matplotlib.colormaps This is new in matplotlib 3.9: matplotlib/matplotlib#23668
matplotlib.cm.get_cmap → matplotlib.colormaps matplotlib/matplotlib#23668
matplotlib.cm.get_cmap → matplotlib.colormaps matplotlib/matplotlib#23668 Fixes #865.
matplotlib.cm.get_cmap → matplotlib.colormaps matplotlib/matplotlib#23668 Fixes #865.
PR Summary
This is my attempt to turn the crank on the depractions on the cm functions.
The changes were more extensive than I anticipated
PR Checklist
Tests and Styling
pytestpasses).flake8-docstringsand runflake8 --docstring-convention=all).Documentation
doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).