I have created heatmap and I want to put a condition that if cell value is higher than 0.05 it will get specific color that is not in the cmap.
Right now what I do is to define vmin and vmax but the problem is that the vmax still get the 0.5 or 0.6 values and I can't be sure that the condition is really kept.
green=sns.light_palette("seagreen",reverse=True,as_cmap=True)
sns.set(rc={'figure.figsize':(18.7,3.27)})
sns.heatmap(fhtmp,square=True,cmap=green,linewidths=.5,vmin=0, vmax=0.05)
as you can see here, I can't really know if the ones that are purple are equal to 0.05 or more than 0.05, I would like to be able to distinguish so if value is greater than 0.05 the cell will have different color such as white or gray.
Edit: I have managed to use kind of mask but green has one tone and the mask has serveral colores.
sns.set(rc={'figure.figsize':(18.7,3.27)})
ax = sns.heatmap(fhtmp, cmap=green, center=0.8, square=True,
linewidth=.5, vmin=0, vmax=0.05)
ax = sns.heatmap(fhtmp, mask=fhtmp < 0.053, cmap='Blues', square=True, annot=False, vmin=0.053, vmax=0.53, cbar=False, ax=ax)
plt.show()
so this is what I get this is still not the desired results
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…