I am using the following code to make a graph and I end up with a black line of x ticks because there are way too many. I tried to specify only 10 with plt.locator but it didn't work. How can I reduce the number of xticks?
fig=plt.figure()
sim_bore = sim_smp.loc[sim_smp['Group'] == group]
mes_bore = mes_smp.loc[mes_smp['Group'] == group]
plt.plot(sim_bore['Date'], sim_bore['Water_Level'] ,label='Simulated',ls ='-',
markersize=2)
plt.plot_date(mes_bore['Date'], mes_bore['Water_Level'], label='Measured',ls ='-')
title = 'Drawdown at %s' %(group)
plt.title(title,fontsize=20)
plt.yticks(fontsize=16)
plt.xticks(fontsize=16)
plt.locator_params(axis='x', nbins=10)
plt.ylabel('Water Level (masl)', fontsize=18)
plt.xlabel('Time', fontsize=18)
ax1.legend(fontsize=20)