Open k-a-mendoza opened 1 year ago
@k-a-mendoza Thanks. Still working through things obviously. Matplotlib has changed a lot of things the last few years and colormaps are one of them. I'd maybe try a lower version of Matplotlib looks like 3.5.3 is when the change occurred. I added the matplotlib version to the setup.py file. Hopefully that works now.
Ah makes sense. Yeah downgrading helped, though it caused me to require a lower python version to be consistent with the other packages.
One possible interim fix could be to add a
try:
from matplotlib.cm import cmap_d
except Exceptio as e:
print("could not import matplotlib.cm. May not be needed")
kinda sloppy but could be helpful if people want to say, use MtPy for the data processing and their own visualization routines separately. Alternately, I could see what needs to be done to update those sections to be compatible with more modern matplotlib usage.
I have also faced this issue. I tried the above suggestions, but I'm unsuccessful. Kindly help me in this regard. AttributeError: module 'matplotlib.cm' has no attribute 'cmap_d' Installed Python version: 3.11 and Matplotlib version: 3.7.2
Installed MtPy 2.0 beta via "pip install git+https://github.com/MTgeophysics/mtpy.git@v2"
upon trying to import MtPy in any way, I get the following error:
For reference, I have matplotlib '3.7.1' installed. This is on python 3.9.16