Skip to content

AttributeError: module 'pylab' has no attribute 'register_cmap' - when I try to use metaphlan_hclust_heatmap.py #3

Description

@ShevchenkoAlla

Hello!

I am trying to make a heatmap from metaphlan output table and I got next error

"""
Traceback (most recent call last):
File "/scripts_metaphlan/./metaphlan_hclust_heatmap.py", line 461, in
hclust( fin = pars['in'],
~~~~~~^^^^^^^^^^^^^^^^^^^^^^
fout = pars['out'],
^^^^^^^^^^^^^^^^^^^
...<18 lines>...
tax_lev = pars['tax_lev']
^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/scripts_metaphlan/./metaphlan_hclust_heatmap.py", line 390, in hclust
add_cmap( c, n )
~~~~~~~~^^^^^^^^
File "/scripts_metaphlan/./metaphlan_hclust_heatmap.py", line 222, in add_cmap
pylab.register_cmap(name=name,cmap=my_cmap)
^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pylab' has no attribute 'register_cmap'
"""

In the https://matplotlib.org/stable/api/pylab.html - pylab is a historic interface and its use is strongly discouraged.

I would appreciate any help,
How can I solve this issue?

Best,
Alla

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