how to set the number of ticks in matplotlib time data code example
Example: matplotlib limit number of ticks
plt.xaxis.set_major_locator(plt.MaxNLocator(3))
plt.yaxis.set_major_locator(plt.MaxNLocator(3))
plt.xaxis.set_major_locator(plt.MaxNLocator(3))
plt.yaxis.set_major_locator(plt.MaxNLocator(3))