matplotlib/seaborn: first and last row cut in half of heatmap plot

前端 未结 11 1175
猫巷女王i
猫巷女王i 2020-11-21 13:35

When plotting heatmaps with seaborn (and correlation matrices with matplotlib) the first and the last row is cut in halve. This happens also when I run this minimal code exa

11条回答
  •  失恋的感觉
    2020-11-21 14:01

    Fixed using the above and setting the heatmap limits manually.

    First

    ax = sns.heatmap(...
    

    checked the current axes with

    ax.get_ylim()
    (5.5, 0.5)
    

    Fixed with

    ax.set_ylim(6.0, 0)
    

提交回复
热议问题