title: How to adjust size of two subplots, one with colorbar and another without, in pyplot ?
body: <p>Consider this example</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  from mpl_toolkits.axes_grid1 import make_axes_locatable
  
  plt.subplot(121)
  img = plt.imshow([np.arange(0,1,.1)],aspect="auto")
  ax = plt.gca()
  divider = make_axes_locatable(ax)
  cax = divider.append_axes("bottom", size="3%", pad=0.5)
  plt.colorbar(img, cax=cax, orientation='horizontal')
  plt.subplot(122)
  plt.plot(range(2))
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/jSLda.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jSLda.png" alt="enter image description here"></a>
  I want to make these two figures (plot region without colorbar) of the same size.  </p>
  
  <p>The size is automatically adjusted if the colorbar is plotted vertically or if two rows are used (211, 212) instead of two columns. </p>