我的Python绘图数据只在x轴上显示了2个点。
我想要更多,但不知道如何做。
我想要更多,但不知道如何做。
x = [ datetime.datetime(1900,1,1,0,1,2),
datetime.datetime(1900,1,1,0,1,3),
...
] # ( more than 1000 elements )
y = [ 34, 33, 23, ............ ]
plt.plot( x, y )
X轴只显示了2个间隔点。我尝试使用.xticks
,但对X轴没有起作用。
它产生了以下错误:
TypeError: object of type 'datetime.datetime' has no len()