error at http://matplotlib.sourceforge.net/matplotlib.pylab.html ?

grid(*args, **kwargs)

  >Set the axes grids on or off; b is a boolean
  >if b is None, toggle the grid state

should that be

grid(b)

?
Keith