added weighting for plot add_sample