How to display all label values in matplotlib?

后端 未结 1 519
醉酒成梦
醉酒成梦 2020-12-10 01:22

I have two lists, when I plot with the following code, the x axis only shows up to 12 (max is 15). May I know how can I show all of the values in x list to the x axis? Thank

相关标签:
1条回答
  • 2020-12-10 01:30

    Add this:

    ax1.set_xticks(np.arange(len(x)))
    

    To your code before your ax1.set_xticklabels(x) call. Is that what you're looking for?

    0 讨论(0)
提交回复
热议问题