Try this: axes.xaxis.set_tick_params(label1On=False)
Python Matplotlib remove xlabels but not grid
-
05-10-2022 - |
Domanda
Is there a way to remove the labels of the x axis, but not the grid lines?
Both solutions to remove the labels also removed my grid lines.
I tried: axes.get_xaxis().set_visible(False)
and axes.get_xaxis().set_ticks([])
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow