title: Plot 2 dimensional numpy array in .npy file using matplotlib?
body: <p>I have numpy file stored as &quot;test.npy&quot; which is a 2 dimensional Synthetic Aperture Radar(SAR) image data with VV and VH polarization bands. How do I plot this 2 dimensional image array using matplotlib?</p>
  <pre><code>import numpy as np
  
  img_array = np.load('test.npy')
  from matplotlib import pyplot as plt
  
  plt.imshow(img_array[1], cmap='gray')
  plt.show()
  </code></pre>
  <p>But the line:</p>
  <pre><code>plt.imshow(img_array[0], cmap='gray')
  </code></pre>
  <p>plots only the first band in the list. So, how is it possible for me to plot 2 dimensional image array?</p>