【发布时间】:2011-04-07 20:16:02
【问题描述】:
我有使用 datetime.datetime.strptime 格式化的时间标记数据,包括毫秒。数据可以跨越几分钟到几个小时。当我使用 pyplot 绘图并放大时,最小刻度线似乎是 1 秒。 matplotlib 的 TickHelper RRuleLocator 似乎只有一个 SecondLocator。有没有办法在放大时包含毫秒分辨率?
receivedTime = datetime.datetime.strptime(str(data[1]), "%H:%M:%S.%f")
fig=plt.figure()
ax=fig.add_axes([0.1,0.1,.8,.8])
fig.autofmt_xdate()
ax.plot(times, prices, color='blue', lw=1, drawstyle='steps-post', label = prices)
plt.show()
【问题讨论】:
标签: python matplotlib