I'm currently working on a heat map produced by the following data.
df = pd.DataFrame(
data = {
'Set_A' : [91, 91, 91, 90, 91, 91, 91],
'Set_B' : [91, 92, 91, 89, 91, 91, 91],
'Set_C' : [89, 90, 89, 88, 90, 89, 89],
'model' : ['SVM', 'RF', 'LR', 'KNN', 'NB', 'MLP', 'LGB'],
}
)
df = df.set_index('model')
sns.heatmap(df, cmap='Reds', annot=True, vmin=85, vmax=95, annot_kws={'color':'black'}, linewidths=.5);
I have two questions.
How can I change the color of the text in the heat map to white for 91 and above and black for 90 and below?
Currently, the colorbar is 86 to 94. I would like to change this to show 85 to 95.