calling updatePlot() now removes the old svg before drawing a new one