Matplotlib: Move ticklabels between ticks

前端 未结 2 1963
北恋
北恋 2020-12-31 01:38

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

2条回答
  •  被撕碎了的回忆
    2020-12-31 01:55

    Alternatively: have you tried im = ax.matshow(data, cmap='gray') instead of imshow()? This should also place the ticklabels on the correct position.

提交回复
热议问题