Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No minor grid lines on the x-axis only

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?

like image 566
Will Vousden Avatar asked Apr 14 '14 14:04

Will Vousden


1 Answers

axes.yaxis.grid(True, which='minor') 

Similarly

axes.xaxis.grid(False, which='minor')
like image 90
GWW Avatar answered Oct 11 '22 15:10

GWW