X Tutup
Skip to content

[Bug]: matplotlib broke compatibility with get_cmap in new release (3.9) #28317

@servoz

Description

@servoz

Bug summary

matplotlib broke compatibility with get_cmap in new release (3.9).

Code for reproduction

$ python
Python 3.12.3 (main, Apr 17 2024, 00:00:00) [GCC 14.0.1 20240411 (Red Hat 14.0.1-0)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> matplotlib.__version__
'3.9.0'
>>> from matplotlib.cm import get_cmap
ImportError: cannot import name 'get_cmap' from 'matplotlib.cm' (C:\Python39-x64\lib\site-packages\matplotlib\cm.py)

Actual outcome

ImportError: cannot import name 'get_cmap' from 'matplotlib.cm' (C:\Python39-x64\lib\site-packages\matplotlib\cm.py)

Expected outcome

no exception.

Additional information

No response

Operating system

linux Fedora40

Matplotlib Version

3.9

Matplotlib Backend

No response

Python version

3.12

Jupyter version

No response

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup