Question

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

Was it helpful?

Solution

Try this: axes.xaxis.set_tick_params(label1On=False)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top