I want to create a visualization of a confusion matrix using matplotlib. Parameters to the methods shown below are the class labels (alphabet), the classification results as
Alternatively: have you tried im = ax.matshow(data, cmap='gray') instead of imshow()? This should also place the ticklabels on the correct position.
im = ax.matshow(data, cmap='gray')
imshow()