how to make plots every loop in a for loop