+1 vote
in Programming Languages by (60.0k points)
Matplotlib function "minor_ticks_on()" turns on ticks on both the X and Y axes. I want to disable ticks on the X-axis, and it should be present only on the Y-axis. How can I do it?

1 Answer

+3 votes
by (354k points)
selected by
 
Best answer

You can use another function "xaxis.set_tick_params()" with "bottom=False" parameter. It will turn off the ticks on the X-axis.

ax.minorticks_on()
ax.xaxis.set_tick_params(which='minor', bottom=False)


...