我想在x = '23:30:00'處顯示垂直線。我也嘗試過x = '23:30'。有任何想法嗎?如何向matplotlib添加垂直線?
df1 = df1.between_time('19:30','23:59')
df1['high'].plot(kind='line',figsize = (10,5))
plt.axvline(x='23:30:00', color = 'r')
plt.show()
我想在x = '23:30:00'處顯示垂直線。我也嘗試過x = '23:30'。有任何想法嗎?如何向matplotlib添加垂直線?
df1 = df1.between_time('19:30','23:59')
df1['high'].plot(kind='line',figsize = (10,5))
plt.axvline(x='23:30:00', color = 'r')
plt.show()
您是否嘗試過使用實際的日期時間實例作爲x變量? – Evert