def color_cycle(colors=None):
    """An infinite iterator of the given (or default) colors
    """
    if colors:
        return itertools.cycle(colors)
    try:
        return itertools.cycle(p["color"] for p in rcParams["axes.prop_cycle"])
    except KeyError:  # matplotlib < 1.5
        return itertools.cycle(rcParams["axes.color_cycle"])