[patch] Major/Minor Grid z-order

With the current release 0.99.1 minor grid lines get drawn above major grid lines. This makes it impossible, for example, to have a dark gray major grid and a light gray minor grid because the minor grid will overwrite the major grid. I'm assuming this is a bug but maybe there is a design reason for this?

As far as I can tell this behaviour comes down to matplotlib.axis.Axis.iter_ticks returning the major ticks before the minor ticks. I made a one line change to matplotlib.axis.Axis.draw (attached) that simply reverses the order that ticks are plotted in.

I will admit though that I don't follow Matplotlib development closely and only tested the fix on the released version so if this has already been fixed or there are unintended consequences I'm not aware of please ignore the noise.


grid_zorder.patch (582 Bytes)


Jed Frechette

Lidar Guys
Mobile: 505-280-1340