To display minor ticks on the axes, you need to use minorticks_on(self).
Make the following change and it will display grids.
ax.grid(b=True, which='major', color='b', linestyle='-')
ax.grid(b=True, which='minor', color='r', linestyle='--')
ax.minorticks_on()