title: Matplotlib, one colorbar for all subplots, overlay on papersize
body: <p>I´ve got the following problem, that my colorbar overlays my papersized subplots that are "printed" as an pdf.</p>
  
  <p>Code example:</p>
  
  <pre><code>import numpy as np
  
  import matplotlib.pyplot as plt
  
  import pandas as pd
  
  if __name__ == '__main__':
  
      titles = np.random.uniform(low=1, high=11, size=(1,10))
      temp = np.random.uniform(low=23, high=200, size=(10,10))
      ctf0102 = np.random.uniform(low=23, high=200, size=(10,10))
      ctf03 = np.random.uniform(low=23, high=200, size=(10,10))
  
      fig = plt.figure(figsize=(11.69,8.27), dpi=100)
  
      for num in range(len(titles)):
  
          ax = fig.add_subplot(3,4,num)
  
          im = ax.scatter(ctf03[1:,num], ctf0102[:,num], 12, temp[:,num], cmap='magma')
  
          ax.set_title(titles[num])
  
  
      fig.text(0.5, -0.00, '...', ha='center', fontsize=16)
  
      fig.text(-0.00, 0.5, '...', va='center', rotation='vertical', fontsize=16)
  
      cbar_ax = fig.add_axes([0.85, 0.15, 0.05, 0.7])
      fig.colorbar(im, cax=cbar_ax)
  
      plt.tight_layout(pad=2)
  
      fig.savefig("example.pdf", dpi=fig.dpi, bbox_inches='tight', pad_inches=0.3)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/sBSRI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sBSRI.png" alt="enter image description here"></a></p>
  
  <p>Any idea how i can move the colorbar to the right, by resizing the space of all my subplots? Besides that i would like to enlarge the colorbar, to become a smooth closing with the top and bottom of all subplots.</p>
  
  <p>Thanks for help and ideas.</p>