I currently have the following code: disp = ConfusionMatrixDisplay(confusion_matrix=cm) disp.plot() plt.show() This results into something like: However, I want the diagonal to be depicted with a black background, and the off-diagonal with a white background, that is something like: How can I change the cell colors accordingly? Continue reading...