'Plot gridlines for both coordinates.
Standard matplotlib appearance options (color, alpha, etc.) can be
passed as keyword arguments. This behaves like `matplotlib.axes.Axes`
except that if no arguments are specified, the grid is shown rather
than toggled.
Parameters
b : bool
Whether to show the gridlines.'

def grid(self, b=None, axis='both', **kwargs):

    if (not hasattr(self, 'coords')):
        return
    which = kwargs.pop('which', 'major')
    if (which != 'major'):
        raise NotImplementedError('Plotting    the    grid    for    the    minor    ticks    is    not    supported.')
    if (axis == 'both'):
        self.coords.grid(draw_grid=b, **kwargs)
    elif (axis == 'x'):
        self.coords[0].grid(draw_grid=b, **kwargs)
    elif (axis == 'y'):
        self.coords[1].grid(draw_grid=b, **kwargs)
    else:
        raise ValueError('axis    should    be    one    of    x/y/both')
