Reputation: 33348
I'm trying to product a plot in which the y-axis has both major and minor gridlines, while the x-axis has only major gridlines.
It's straightforward enough to disable minor grid lines on both axes, like so:
axes.grid(False, which='minor')
But I can't find a way of applying this to only one axis. Am I missing something?
Upvotes: 7
Views: 2056
Reputation: 44093
axes.yaxis.grid(True, which='minor')
Similarly
axes.xaxis.grid(False, which='minor')
Upvotes: 11