3

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

CDJB
  • 14,043
  • 5
  • 29
  • 55
amiref
  • 3,181
  • 7
  • 38
  • 62
  • Notice that in both directions, the ticks are in the middle of the blocks, but your y-axis starts and ends on a full tick instead of a half tick – Mad Physicist Jan 07 '20 at 13:45

1 Answers1

3

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.

CDJB
  • 14,043
  • 5
  • 29
  • 55