def cmap_center_point_adjust(cmap, range, center):
    """
    Converts center to a ratio between 0 and 1 of the
    range given and calls cmap_center_adjust(). returns
    a new adjusted colormap accordingly

    :param cmap: colormap instance
    :param range: Tuple of (min, max)
    :param center: New cmap center
    """
    if not ((range[0] < center) and (center < range[1])):
        return cmap
    return cmap_center_adjust(
        cmap,
        abs(center - range[0]) / abs(range[1] - range[0]))
def cmap_center_point_adjust ( cmap , range , center ) : if not ( ( range [ 0 ] < center ) and ( center < range [ 1 ] ) ) : return cmap return cmap_center_adjust ( cmap , abs ( center - range [ 0 ] ) / abs ( range [ 1 ] - range [ 0 ] ) )
Converts center to a ratio between 0 and 1 of the
    range given and calls cmap_center_adjust(). returns
    a new adjusted colormap accordingly

    :param cmap: colormap instance
    :param range: Tuple of (min, max)
    :param center: New cmap center