📌  相关文章
📜  seaborn 热图参数 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:42.326000             🧑  作者: Mango

代码示例1
# seaborn heatmap best parameter
plt.figure(figsize=(20,8))
sns.heatmap(corr, vmax=1, vmin=-1, center=0,
            linewidth=.5,square=True, annot = True,
            annot_kws = {'size':8},fmt='.1f', cmap='BrBG_r', ax=ax1,  # ax: use this when using subplot
            cbar_kws = dict(use_gridspec=False,location="top", shrink=0.9)) # cbar_kws: for positioning cbar and "shrink" for reducing cbar size
plt.title('Correlation')
plt.show()