解决seaborn heatmap显示不完整bug

494 阅读1分钟

问题如图

image.png

这是matplotlib3.1.1的BUG,在stackoverflow上有解答,有以下三个解决办法。

  • revert to matplotlib 3.1.0
  • use matplotlib 3.1.2 or higher
  • set the heatmap limits manually (ax.set_ylim(bottom, top) # set the ylim to bottom, top)

我推荐的方案是更新你的matplotlib的版本。

pip install --upgrade matplotlib

重启你的jupyter notebook就好了