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

前端 未结 11 1159
猫巷女王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:19

    Unfortunately matplotlib 3.1.1 broke seaborn heatmaps; and in general inverted axes with fixed ticks.
    This is fixed in the current development version; you may hence

    • 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)

提交回复
热议问题