rounding of sampleSize causes imprecise drawing of wave