【问题标题】:How to make all cells in heatmap square如何使热图中的所有单元格为正方形
【发布时间】:2020-03-10 15:02:01
【问题描述】:

嘿,我正在绘制 pandas 数据框的热图,但顶行和底行的单元格不是正方形/与其余部分的形状或大小相同,请参见图片。 我错过了什么?

sns.heatmap(mat, ax=ax, cmap=cmap, linewidths=.5, square=True)

谢谢!

【问题讨论】:

    标签: python python-3.x seaborn heatmap


    【解决方案1】:

    更新 matplotlib 修复了这个问题。显然这是 matplotlib 3.1.1 的问题,请参阅https://github.com/mwaskom/seaborn/issues/1773

    【讨论】:

      猜你喜欢
      • 2021-10-25
      • 1970-01-01
      • 2018-03-29
      • 2014-05-15
      • 2021-10-18
      • 1970-01-01
      • 2021-05-08
      • 2017-05-19
      • 2021-05-01
      相关资源
      最近更新 更多