Hide the tick labels, but not ticks themselves in matplotlib
January 30th, 2013 by Lawrence David
To hide the tick labels on the x-axis, but still preserve the ticks themselves (useful for grids):
[label.set_visible(False) for label in ax.get_xticklabels()]
Very helpfull. Thank you!