Rotate axis text in python matplotlib

前端 未结 13 921
暗喜
暗喜 2020-11-22 14:50

I can\'t figure out how to rotate the text on the X Axis. Its a time stamp, so as the number of samples increase, they get closer and closer until they overlap. I\'d like

13条回答
  •  遇见更好的自我
    2020-11-22 15:37

    Try pyplot.setp. I think you could do something like this:

    x = range(len(time))
    plt.xticks(x,  time)
    locs, labels = plt.xticks()
    plt.setp(labels, rotation=90)
    plt.plot(x, delay)
    

提交回复
热议问题