plt.gca().xaxis.set_major_locator(MinuteLocator(byminute=list(range(0, 60, 10))))
plt.gca().xaxis.set_major_formatter(DateFormatter('%H:%M:%S'))
plt.gca().set_xlim(larger_alim(plt.gca().get_xlim()))
Manually setting xticks with xaxis_date() in Python/matplotlib