Python: 画图,横轴显示时间(小时,分钟),纵轴显示随时间变化的另一个量。横轴怎样显示?
PHP中文网
PHP中文网 2017-04-17 14:50:40
0
0
1050

如题
import numpy as np
import matplotlib.pyplot as plt

plt.plot(inTime, inData, 'ro');
plt.show()
~~~~~~~~~~~~~~~~~~~~~~~
inTime是 inTime=[datetime.datetime(2015,5,4,0,0,0,5000),datetime.datetime(2015,5,4,0,1,0,5000),datetime.datetime(2015,5,4,0,2,0,5000)...]

这样plt.plot出的图,横轴无法看,怎样让横轴的点只显示小时+分钟?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template