def _jitter_envelope(pos_data, xvals, violin, side):
    if side == 'both':
        low, high = (-1., 1.)
    elif side == 'right':
        low, high = (0, 1.)
    elif side == 'left':
        low, high = (-1., 0)
    else:
        raise ValueError("`side` input incorrect: %s" % side)

    jitter_envelope = np.interp(pos_data, xvals, violin)
    jitter_coord = jitter_envelope * np.random.uniform(low=low, high=high,
                                                       size=pos_data.size)

    return jitter_coord
Determine envelope for jitter markers.
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/graphics/boxplots.py/_jitter_envelope