The labels on my horizontal colorbar are too close together and I don\'t want to reduce text size further:
cbar = plt.colorbar(shrink=0.8, orientation=\'hori
I use the following to show every 7th x label:
plt.scatter(x, y)
ax = plt.gca()
temp = ax.xaxis.get_ticklabels()
temp = list(set(temp) - set(temp[::7]))
for label in temp:
label.set_visible(False)
plt.show()
It's pretty flexible, as you can do whatever you want instead of plt.scatter. Hope it helps.