Vertical xtick labels on top, not bottom

后端 未结 2 862
温柔的废话
温柔的废话 2021-02-12 09:24

I want to plot a confusion matrix using Pylab. The class labels along the horizontal axis are long, so I want to plot them rotated vertically. However, I also want to plot them

2条回答
  •  说谎
    说谎 (楼主)
    2021-02-12 10:05

    Reading your post, and trying by myself, I found one very simple way of setting the ticks on top on the axes: pylab.gca().tick_top()

    Cheers!

提交回复
热议问题