title: Stopping a matplotlib plot from opening a window (plt.show() not called)
body: <p>I am creating a plot using the following code, and saving it to a path. However, the plot opens a new window without me explicitly calling <code>plt.show()</code>. Does anyone know how to stop the window opening?</p>
  
  <pre><code>arr1 = np.random.rand(150,500)
  arr2 = np.random.rand(150,500)
  
  fig = plt.figure()
  
  a=fig.add_subplot(1,2,1)
  imgplot = plt.imshow(arr1)
  a.set_title('Image 1')
  a.xaxis.set_visible(False)
  a.yaxis.set_visible(False)
  
  a=fig.add_subplot(2,2,1)
  imgplot = plt.imshow(arr2)
  a.set_title('Image 2')
  a.xaxis.set_visible(False)
  a.yaxis.set_visible(False)  
  
  plt.savefig('C:/Users/.../fig.png', bbox_inches='tight')
  </code></pre>