update the plot