我已经使用以下代码使用seaborn生成了一个热力图:
sns.heatmap(df.sort_index(axis=1), cmap="YlOrRd_r", center=0.8, square=True, annot=annot_df.sort_index(axis=1), annot_kws={"size":22, "va": "center_baseline", "color":"white"}, fmt="", xticklabels=True, yticklabels=True, linewidth=1, linecolor="grey", vmax=1, vmin=0.5)
现在我想要以不同的颜色进行着色,例如将所有值 > 0.9 的单元格涂成蓝色,而其他单元格应保持红黄渐变。是否有一种简单的实现方法?提前感谢您!