set number of xticks matplotlib code example
Example 1: change xticks python
plt.xticks(np.arange(0,10),np.arange(10,20))
Example 2: matplotlib limit number of ticks
plt.xaxis.set_major_locator(plt.MaxNLocator(3))
plt.yaxis.set_major_locator(plt.MaxNLocator(3))