Python update plot in loop