How to get rid of white lines in confusion matrix?

Solution 1:

plt.figure(figsize=(10,5))

plt.grid(False)

plot_confusion_matrix(cnf_matrix, classes=class_names, normalize=False, title='Normalized confusion matrix')