Reputation: 565
Pretty simple, I want minor ticks on my subplot on the xaxis, but not the yaxis. I've tried all sorts (there seem to be hundreds of methods for ticks) but all seem to want me to specify the locations for the ticks, or use a TickLocator. I just want them on, and not to have to specify where (just like how the Major ticks work automatically).
Something like:
axis.set_minor_xticks_on()
or
axis.xaxis.set_minor_ticks()
or
axis.set_ticks(which='minor', True)
seems so simple but these don't work and I can't seem to find an equivalent. Surely there is one? I don't want labels on the minor ticks.
Using Python 3.5.2 and Matplotlib 1.5.3
Upvotes: 2
Views: 6106
Reputation: 565
I managed to achieve what I wanted to achieve with:
ax.minorticks_on()
ax.tick_params(axis='x', which='minor', direction='out')
Upvotes: 6