proplot-dev / proplot

🎨 A succinct matplotlib wrapper for making beautiful, publication-quality graphics
https://proplot.readthedocs.io
MIT License
1.11k stars 102 forks source link

proplot makes me can not import the colormaps and colors from matplotlib? #403

Closed yilvzhishi closed 1 year ago

yilvzhishi commented 1 year ago

When I have not installed the proplot by conda-forge in a conda env ,I can import the colormaps and colors form matplotlib,but when i install matplotlib and proplot in an env ,i find that i can't import the colormaps and colors from the matplotlib,and i create a new conda env to test in addition,i also found the question,hope the team of proplot can note and solve this issue.

When I test an env that only installed matplotlib, image this env "pygis" only have matplotlib and not have proplot installed. image But when i change an env which have the matplotlib and proplot installed together,it can't work and raise an error. image This env "test" have the matplotlib and proplot,please see: image

syrte commented 1 year ago

Note that the matplotlib version is different in your two enviroments. I guess it is because you just cannot import colormaps from matplotlib 3.4, no matter you have installed proplot or not.

syrte commented 1 year ago

Confirmed: matplotlib.colormaps was introduced in 3.5 https://matplotlib.org/stable/users/prev_whats_new/whats_new_3.5.0.html#colors-and-colormaps

lukelbd commented 1 year ago

Yep, right now the stable release 0.9.7 is only compatible with matplotlib <= 3.4. However the "dev" version has 3.5.X compatibility (you can install with pip install git+https://github.com/proplot-dev/proplot).