2
我有時間使用包含毫秒的datetime.datetime.strptime格式化數據。數據可以從幾分鐘到幾個小時。當我使用pyplot進行繪圖並放大時,似乎最小刻度標記是1秒。看來,matplotlib的TickHelper RRuleLocator只有一個SecondLocator。放大時有沒有辦法包含毫秒分辨率?在python matplotlib.dates中繪製毫秒
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()