我有一个数据类型为timedelta64[ns]的numpy数组。但是,将其用作matplotlib绘图中的x轴会显示标签4.320、4.325、4.330等
似乎matplotlib无法正确显示timedelta64,如何将其转换为datetime.timedelta?你知道吗
采样时间:12:00:00.08012
打印arr[2]返回0天12:00:00.08012
x = tbl.time
f, ax = plt.subplots(2, sharex=True)
ax[0].plot(x, tbl.column, label='test', color='red')
ax[1].plot(x, tbl.column2, label='test2', color='blue')
plt.show()
目前没有回答
相关问题 更多 >
编程相关推荐