added resetPlot function to draw a blank canvas