Changing the number of ticks on a Matplotlib plot axis

# Get the current axis
ax = plt.gca()

# Only label every 20 th value
ticks_to_use = df.index[::20]

# Set format of labels(note year not excluded as requested)
labels = [i.strftime("%-H:%M") for i in ticks_to_use]

# Now set the ticks and labels
ax.set_xticks(ticks_to_use)
ax.set_xticklabels(labels)

Here is what the above code is Doing:
1. Get the current axis
2. Only label every 20th value
3. Set format of labels
4. Now set the ticks and labels