Feed on

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()]

Bookmark and Share

if that was helpful ...

check out the other tips and tricks i've compiled on these pages. you might learn something else interesting!

One Response to “Hide the tick labels, but not ticks themselves in matplotlib”

  1. on 12 Dec 2014 at 9:23 am mentalo

    Very helpfull. Thank you!

Did I get this wrong? Let me know!

Trackback URI | Comments RSS