Returns a new colormap based on the one given
    but adjusted so that the old center point higher
    (>0.5) or lower (<0.5)

    :param cmap: colormap instance (e.g., cm.jet)
    :param center_ratio:

def cmap_center_adjust(cmap, center_ratio):
    """
    Returns a new colormap based on the one given
    but adjusted so that the old center point higher
    (>0.5) or lower (<0.5)

    :param cmap: colormap instance (e.g., cm.jet)
    :param center_ratio:

    """
    if not (0. < center_ratio) & (center_ratio < 1.):
        return cmap
    a = math.log(center_ratio) / math.log(0.5)
    return cmap_powerlaw_adjust(cmap, a)