# Metaphlan 2 heat map

**URL:** <https://forum.biobakery.org/t/metaphlan-2-heat-map/405>\
**Category:** MetaPhlAn\
**Created:** [April 29, 2020, 2:00pm UTC](https://forum.biobakery.org/t/metaphlan-2-heat-map/405 "2020-04-29T14:00:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![barichd](https://avatars.discourse-cdn.com/v4/letter/b/9f8e36/32.png) [@barichd](https://forum.biobakery.org/u/barichd)\
**Post date:** [April 29, 2020, 2:00pm UTC](https://forum.biobakery.org/t/metaphlan-2-heat-map/405/1 "2020-04-29T14:00:56Z")

</div>

I’m getting the following error when trying to generate a heat map:

higleyadmin@JOAN9000 ~ % metaphlan\_hclust\_heatmap.py -c bbcry --top 25 --minv 0.1 -s log --in water\_metaphlan\_combined.txt --out abundance\_heatmap.png  
Traceback (most recent call last):  
File “/opt/anaconda/envs/python2/bin/metaphlan\_hclust\_heatmap.py”, line 481, in   
tax\_lev = pars[‘tax\_lev’]  
File “/opt/anaconda/envs/python2/bin/metaphlan\_hclust\_heatmap.py”, line 452, in hclust  
heatmap\_panel( fig, D, minv, maxv, idx1, idx2, cm\_name, scale, sample\_labels, feat\_labels, label\_font\_size, -cm\_h_8.0/ysize, cm\_h_0.8_8.0/ysize, flabelon, slabelon, cm\_ticks, gridon, ydend\_offset+sdend\_h_8.0  
/ysize )  
File “/opt/anaconda/envs/python2/bin/metaphlan\_hclust\_heatmap.py”, line 235, in heatmap\_panel  
axisbg=bottom\_col)  
File “/opt/anaconda/envs/python2/lib/python2.7/site-packages/matplotlib/figure.py”, line 1149, in add\_axes  
a = projection\_class(self, rect, \*\*kwargs)  
File “/opt/anaconda/envs/python2/lib/python2.7/site-packages/matplotlib/axes/\_base.py”, line 541, in **init**  
self.update(kwargs)  
File “/opt/anaconda/envs/python2/lib/python2.7/site-packages/matplotlib/artist.py”, line 888, in update  
for k, v in props.items()]  
File “/opt/anaconda/envs/python2/lib/python2.7/site-packages/matplotlib/artist.py”, line 881, in \_update\_property  
raise AttributeError(‘Unknown property %s’ % k)  
AttributeError: Unknown property axisbg  
higleyadmin@JOAN9000 ~ %

Any ideas?

---

<div class="post-metadata">

**Author:** ![fbeghini](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/fbeghini/32/81_2.png) [@fbeghini](https://forum.biobakery.org/u/fbeghini)\
**Post date:** [April 30, 2020, 11:50am UTC](https://forum.biobakery.org/t/metaphlan-2-heat-map/405/2 "2020-04-30T11:50:21Z")

</div>

Hi, which version of matplotlib have you installed?

---

<div class="post-metadata">

**Author:** ![barichd](https://avatars.discourse-cdn.com/v4/letter/b/9f8e36/32.png) [@barichd](https://forum.biobakery.org/u/barichd)\
**Post date:** [April 30, 2020, 7:07pm UTC](https://forum.biobakery.org/t/metaphlan-2-heat-map/405/3 "2020-04-30T19:07:26Z")

</div>

I checked my conda install and it has matplotlib 2.2.3

---

<div class="post-metadata">

**Author:** ![fbeghini](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/fbeghini/32/81_2.png) [@fbeghini](https://forum.biobakery.org/u/fbeghini)\
**Post date:** [May 1, 2020, 9:00am UTC](https://forum.biobakery.org/t/metaphlan-2-heat-map/405/4 "2020-05-01T09:00:59Z")

</div>

The `metaphlan_hclust_heatmap.py` script is deprecated, I’d advise you for using [hclust2](https://github.com/SegataLab/hclust2) for heatmap visualization. The script is removed in MetaPhlAn 3.0.

If you have a conda environment for MetaPhlAn3, you can clone the hclust2 repo and use from it, it has all the right dependencies installed.

---

<div class="post-metadata">

**Author:** ![barichd](https://avatars.discourse-cdn.com/v4/letter/b/9f8e36/32.png) [@barichd](https://forum.biobakery.org/u/barichd)\
**Post date:** [May 1, 2020, 6:08pm UTC](https://forum.biobakery.org/t/metaphlan-2-heat-map/405/5 "2020-05-01T18:08:21Z")

</div>

Thank you. The new script works fine. There should be a mention of the deprecation in the documentation.
