import seaborn as sns
fig,ax=plt.subplots()
sns.heatmap(r,annot=True,linewidth=0.5) #r为计算得到的相关系数矩阵
plt.rc('font',family='Times New Roman')
plt.tight_layout()
plt.savefig('C:\\Users\\47260\\Desktop\\r5.tif',dpi=300)
plt.show()