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

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top