update data and plot