matplotlib / cmocean

Colormap setup for standardizing commonly-plotting oceanographic variables.
MIT License
230 stars 52 forks source link

Future incompatibility with MPL #83

Closed neutrinoceros closed 1 year ago

neutrinoceros commented 2 years ago

Just wanted to warn you about the pending deprecation of some functions in the matplotlib.cm namespace that are used in cmocean, like register_cmap

https://github.com/matplotlib/matplotlib/pull/23668

If it's any help, here's the patch I wrote to adapt to these deprecations in yt https://github.com/yt-project/yt/pull/4089

I can also submit a PR here if you lack time for this.

camUrban commented 1 year ago

I'm getting a depreciation warning from Matplotlib when I use cmocean because of register_cmap. A bug fix for this issue would be awesome! :smile:

neutrinoceros commented 1 year ago

@kthyng any chance you could give a status on this ?

kthyng commented 1 year ago

@neutrinoceros So sorry I've been unresponsive! It's hard to find the time for this at the moment. If you do have the bandwidth for a PR I'll be more responsive. Otherwise I'll aim to work on it in the time frame of the next month. Sorry I can't be faster!

neutrinoceros commented 1 year ago

I'm still happy to give it a go. I'm going to aim at delivering a PR before next week !

kthyng commented 1 year ago

Thanks @neutrinoceros!

dstansby commented 1 year ago

Any chance a new release can be put out with this fix in it?

kthyng commented 1 year ago

@dstansby, @neutrinoceros, @camUrban — There is a new release for cmocean on PyPI now! Sorry for the delay — I think I had a plan to do this earlier but didn't end up getting back to it when I thought I would. The new version is still propagating to conda-forge but hopefully will in the next day.

dstansby commented 1 year ago

Amazing, thanks a lot 😄