pyplati / platipy

Processing Library and Analysis Toolkit for Medical Imaging in Python
https://pyplati.github.io/platipy/
Apache License 2.0
103 stars 24 forks source link

Deprecation warning - Matplotlib `get_cmap` #255

Closed dalmouiee closed 4 months ago

dalmouiee commented 5 months ago
tests/test_pipeline.py::test_pipeline
  /home/runner/.cache/pypoetry/virtualenvs/pydicer-pNPN9n62-py3.8/lib/python3.8/site-packages/platipy/imaging/visualisation/visualiser.py:1203: MatplotlibDeprecationWarning: The get_cmap function was deprecated in Matplotlib 3.7 and will be removed two minor releases later. Use ``matplotlib.colormaps[name]`` or ``matplotlib.colormaps.get_cmap(obj)`` instead.
    colormap = plt.cm.get_cmap(colormap_name)
tests/test_pipeline.py::test_pipeline
  /home/runner/.cache/pypoetry/virtualenvs/pydicer-pNPN9n62-py3.8/lib/python3.8/site-packages/platipy/imaging/visualisation/visualiser.py:1212: MatplotlibDeprecationWarning: The get_cmap function was deprecated in Matplotlib 3.7 and will be removed two minor releases later. Use ``matplotlib.colormaps[name]`` or ``matplotlib.colormaps.get_cmap(obj)`` instead.
    colormap = plt.cm.get_cmap(colormap_name, scalar.discrete_levels)