Removing outliers for curve plot