def plot_color_map_bars(values, vmin=None, vmax=None, color_map=None,
                        axis=None, **kwargs):
    '''
    Plot bar for each value in `values`, colored based on values mapped onto
    the specified color map.

    Args
    ----

        values (pandas.Series) : Numeric values to plot one bar per value.
        axis : A matplotlib axis.  If `None`, an axis is created.
        vmin : Minimum value to clip values at.
        vmax : Maximum value to clip values at.
        color_map : A matplotlib color map (see `matplotlib.cm`).
        **kwargs : Extra keyword arguments to pass to `values.plot`.

    Returns
    -------

        (axis) : Bar plot axis.
    '''
    if axis is None:
        fig, axis = plt.subplots()

    norm = mpl.colors.Normalize(vmin=vmin or min(values),
                                vmax=vmax or max(values), clip=True)
    if color_map is None:
        color_map = mpl.rcParams['image.cmap']
    colors = color_map(norm(values.values).filled())

    values.plot(kind='bar', ax=axis, color=colors, **kwargs)
    return axis
Plot bar for each value in `values`, colored based on values mapped onto
    the specified color map.

    Args
    ----

        values (pandas.Series) : Numeric values to plot one bar per value.
        axis : A matplotlib axis.  If `None`, an axis is created.
        vmin : Minimum value to clip values at.
        vmax : Maximum value to clip values at.
        color_map : A matplotlib color map (see `matplotlib.cm`).
        **kwargs : Extra keyword arguments to pass to `values.plot`.

    Returns
    -------

        (axis) : Bar plot axis.