Skip to content

Commit b5c4ec8

Browse files
committed
#169 add labels in sns plot that used to be in data frame
1 parent 9a562ec commit b5c4ec8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/confusionmatrix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def func(args):
5858
df_cm = df_cm.astype('float') / df_cm.sum(axis=1)[:, np.newaxis]
5959
sns.set(font_scale=1)
6060
# Add 'annot=True' to the list of options for heatmap if you want to print the numbers, ideal only for small maps
61-
hm = sns.heatmap(df_cm, cmap="Greys",cbar=False,fmt='.1%',linewidths=0.1,linecolor='black')
61+
hm = sns.heatmap(df_cm, cmap="Greys",cbar=False,fmt='.1%',linewidths=0.1,linecolor='black',xticklabels=column_labels, yticklabels=index_labels)
6262
hm.set_yticklabels(hm.get_yticklabels(), rotation=0)
6363
hm.set_xticklabels(hm.get_xticklabels(), rotation=90)
6464
plt.title("Normalized Confusion Matrix")

0 commit comments

Comments
 (0)