def colorspace(size):
    """Returns an cycler over a linear color space with 'size' entries.

    Args:
        size (int): the number of colors to define in the space.

    Returns:
        itertools.cycle: iterable cycler with 'size' colors.
    """
    from matplotlib import cm
    from itertools import cycle
    import numpy as np
    rbcolors = cm.rainbow(np.linspace(0, 1, size))
    return cycle(rbcolors)
