如何使用Matplotlib在轴上均匀地放置几个标签?

时间:2018-07-19 13:39:28

标签: python matplotlib axis labels

我正在使用Matplotlib.pyplot。我这样写的想法是在X轴上只显示那些标签,以表示时间。

plt.xticks( ["Dec 17", "Jan 18", "Feb 18", "Mar 18", "Apr 18", "May 18", "Jun 18", "Jul 18"])

但是它们像这样堆叠在一起:

enter image description here

如果我让数据集中的默认标签确实沿轴均匀放置,但是它们就像80个日期,因此它们重叠并且我只会看到黑线。

如何将标签均匀地放置在轴上?

0 个答案:

没有答案