How do show only one figure at the time in a loop like shown below? In this example all im getting is a small window without axes that freezes.