plot of weighting and penalty functions