add deleteCurve and clearCurve function to plot class