Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Seaborn heatmap top and bottom row are partially truncated [duplicate]

I am trying to make a heatmap out of a dataframe, but the size of the blocks in the first and last row are not as equal as the blocks in the other rows. How can I fix this problem?

P.S. I am using python3 and seaborn library to produce the heatmap.

enter image description here

like image 867
amiref Avatar asked Dec 01 '25 03:12

amiref


1 Answers

This issue has been raised and closed on the Seaborn github. The solution found there by ResidentMario & MaozGelbart was:

This was a matplotlib regression introduced in 3.1.1 which has been fixed in 3.1.2 (still forthcoming). For now the fix is to downgrade matplotlib to a prior version.

And later,

Matplotlib 3.1.2 has been released (also available for conda users through conda-forge using conda install -c conda-forge matplotlib=3.1.2). This fixes the issue.

like image 180
CDJB Avatar answered Dec 02 '25 17:12

CDJB



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!