title: Matplotlib show multiple images with for loop
body: <p>I want to display multiple figure in Matplotlib. Here's my code:</p>
  
  <pre><code>for i in range(8): 
      a = sitk.ReadImage("000%d.IMA"%(i+1))
      ...
  
      plt.figure(i+1)
      plt.imshow(a_np,cmap=plt.cm.gray)
  </code></pre>
  
  <p>However, figure(1) to figure(7) will show during the process but only figure(8) stay in the end. How can I see all of the figures at the same time?
  It confused me that my environment is Ipython notebook when I change the environment to spyder the result will be correct.</p>