def _calc_lin_int(x, min_x, max_x, r_min, r_max):
    """
    Calculates linear interpolation between the given values.

    If x == min_data -> size = r_min
    If x == max_data -> size = r_max
    In between: linear interpolation.

    Parameters
    ----------
    x : float
        Value between min_x and max_x.
    min_x : float
        The minimal reachable number.
    max_x : float
        The maximal reachable number.
    r_min : float
        The minimal radius.
    r_max : float
        The maximal radius.

    Returns
    -------
    float
        circle size.
    """
    return (x - min_x)/(max_x - min_x) * (r_max - r_min) + r_min