As I said, you can achieve what you want based on some key classes, I decided to do it (but, as I said, this is probably not worth the effort). Anyway, here is what I got:
from matplotlib import pyplot as plt from matplotlib import axes as maxes from matplotlib import axis as maxis import matplotlib.ticker as mticker import matplotlib.cbook as cbook from matplotlib.projections import register_projection from matplotlib import ticker import numpy as np class SubMinorXAxis(maxis.XAxis): def __init__(self,*args,**kwargs): self.subminor = maxis.Ticker() self.subminorTicks = [] self._subminor_tick_kw = dict() super(SubMinorXAxis,self).__init__(*args,**kwargs) def reset_ticks(self): cbook.popall(self.subminorTicks)
This is not ideal, but for the use case, you gave him the opportunity to work normally. I drew some ideas from this matplotlib example and directly going through the source code. The result is as follows:

I tested the code in both Python 2.7 and Python 3.5.
EDIT
I noticed that the subminor grid subminor always be drawn if the grid is on (although I assumed that it would not be drawn at all). I fixed this in the code above, i.e. subminor should never create grid lines. If the meshes have to be done correctly, another job will be required.
Thomas KΓΌhn
source share