title: plot several image files in matplotlib subplots
body: <p>I would like to create a matrix subplot and display each BMP files, from a directory, in a different subplot, but I cannot find the appropriate solution for my problem, could somebody helping me?.</p>
  
  <p>This the code that I have:</p>
  
  <pre><code>import os, sys
  from PIL import Image
  import matplotlib.pyplot as plt
  from glob import glob
  
  bmps = glob('*trace*.bmp')
  
  fig, axes = plt.subplots(3, 3)
  
  for arch in bmps:
      i = Image.open(arch)
      iar = np.array(i)
      for i in range(3):
          for j in range(3):
              axes[i, j].plot(iar)
              plt.subplots_adjust(wspace=0, hspace=0)
  plt.show()
  </code></pre>
  
  <p>I am having the following error after executing:</p>
  
  <p><a href="https://i.stack.imgur.com/7ysnN.png" rel="noreferrer"><img src="https://i.stack.imgur.com/7ysnN.png" alt="enter image description here"></a></p>