title: Multiple imshow-subplots, each with colorbar
body: <p>I want to have a figure consisting of, let's say, four subplots. Two of them are usual line-plots, two of them imshow-images.</p>
  
  <p>I can format the imshow-images to proper plots itself, because every single one of them needs its own colorbar, a modified axis and the other axis removed.
  This, however, seems to be absolutely useless for the subplotting. Can anyone help me with that?</p>
  
  <p>I use this for displaying the data of the "regular" plots above as a colormap (by scaling the input-array <code>i</code> to <code>[ i, i, i, i, i, i ]</code> for 2D and calling <code>imshow()</code> with it).</p>
  
  <p>The following code first displays what I need as a subplot and the second one shows all I can do, which is not sufficient.</p>
  
  <pre><code>#!/usr/bin/env python
  
  import matplotlib.pyplot as plt
  from matplotlib.colors import LogNorm
  
  s = { 't':1, 'x':[1,2,3,4,5,6,7,8], 'D':[0.3,0.5,0.2,0.3,0.5,0.5,0.3,0.4] }
  width = 40
  
  # how I do it in just one plot
  tot = []
  for i in range(width):
      tot.append(s['D'])
  
  plt.imshow(tot, norm=LogNorm(vmin=0.001, vmax=1))
  plt.colorbar()
  plt.axes().axes.get_xaxis().set_visible(False)
  plt.yticks([0, 2, 4, 6], [s['x'][0], s['x'][2], s['x'][4], s['x'][6]])
  
  plt.show()
  
  
  f = plt.figure(figsize=(20,20))
  
  plt.subplot(211)
  plt.plot(s['x'], s['D'])
  plt.ylim([0, 1])
  
  #colorplot
  sp = f.add_subplot(212)
  
  #reshape (just necessary to see something)
  tot = []
  for i in range(width):
      tot.append(s['D'])
  
  sp.imshow(tot, norm=LogNorm(vmin=0.001, vmax=1))
  
      #what I can't do now but needs to be done:
      #sp.colorbar()
  #sp.axes().axes.get_xaxis().set_visible(False)
  #sp.yticks([0, 200, 400, 600, 800, 1000], [s['x'][0], s['x'][200], s['x'][400], s['x'][600], s['x'][800], s['x'][1000]])
  
  plt.show()
  </code></pre>