'Add the lines from a non-filled
:class:`~matplotlib.contour.ContourSet` to the colorbar.
Set *erase* to False if these lines should be added to
any pre-existing lines.'

def add_lines(self, CS, erase=True):

    if ((not isinstance(CS, contour.ContourSet)) or CS.filled):
        raise ValueError(u'add_lines    is    only    for    a    ContourSet    of    lines')
    tcolors = [c[0] for c in CS.tcolors]
    tlinewidths = [t[0] for t in CS.tlinewidths]
    ColorbarBase.add_lines(self, CS.levels, tcolors, tlinewidths, erase=erase)
