Plot pandas dataframe with defined ticks (conversion to datetime)
df.plot()
fortunately returns a matplotlib.AxesSubplot
so you can change paramaters as you would usually do. Also, to properly define datetime xticks, you should use the matplotlib.dates
package.
import matplotlib.pyplot as plt
import matplotlib.dates as md
ax = df.plot(color=colors)
min_time = df.index.minute.min
max_time = df.index.minute.max
time_int = 5
xlocator = md.MinuteLocator(byminute=np.arange(min_time, max_time+1, time_int), interval = 1)
ax.xaxis.set_major_locator(xlocator)