title: Removing white space around heatmap subplot with shared colorbar
body: <p>I have the following code that plots 3 heatmaps in a row and then adds a shared colorbar to the right of the heatmaps:</p>
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  num_rows = 100
  num_cols = 200
  noise_array_1 = np.random.rand(num_rows, num_cols)
  noise_array_2 = np.random.rand(num_rows, num_cols)
  noise_array_3 = np.random.rand(num_rows, num_cols)
  
  figure, axes = plt.subplots(1, 3)
  figure.set_dpi(200)
  
  figure.suptitle(&quot;Heat maps title&quot;)
  
  heatmap = axes[0].imshow(noise_array_1, cmap=&quot;jet&quot;)
  heatmap = axes[1].imshow(noise_array_2, cmap=&quot;jet&quot;)
  heatmap = axes[2].imshow(noise_array_3, cmap=&quot;jet&quot;)
  
  figure.subplots_adjust(right=0.8)
  colorbar_axes = figure.add_axes([0.85, 0.1, 0.01, 0.3])
  figure.colorbar(heatmap, cax=colorbar_axes)
  
  plt.show()
  </code></pre>
  <p>However, there is a huge amount of white space above and below the plots. I've tried a few methods to solve this issue, but they usually end up removing the white space at the cost of messing up the position of the shared colorbar. As such, what I'm trying to do is the following:</p>
  <ol>
  <li>Remove white space above and below the subplots</li>
  <li>Position the colorbar correctly once the white space has been removed</li>
  </ol>
  <p>This is the output I currently get:</p>
  <p><a href="https://i.stack.imgur.com/OSdly.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OSdly.png" alt="enter image description here" /></a></p>