title: Uneven subplot in python
body: <p>What is the best way to create a (3,3) subplot matrix in python with the following catch:</p>
  
  <ul>
  <li>first column contains 3 subplots</li>
  <li>second column contains 3 subplots</li>
  <li>third column contains <strong>2 subplots</strong> </li>
  </ul>
  
  <p>The last two subplots should have equal size. This means they will meet in the middle of the middle plot for the other two columns. </p>
  
  <p>I tried to do this with gridspec but did not managed so far. </p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  from matplotlib import gridspec
  
  # generate some data
  x = np.arange(0, 10, 0.2)
  y = np.sin(x)
  
  # plot it
  fig = plt.figure(figsize=(8, 6))
  
  gs = gridspec.GridSpec(3, 3)
  
  ax0 = plt.subplot(gs[0])
  ax0.plot(x, y)
  ax1 = plt.subplot(gs[1])
  ax1.plot(y, x)
  
  ax3 = plt.subplot(gs[3])
  ax3.plot(y, x)
  ax4 = plt.subplot(gs[4])
  ax4.plot(y, x)
  
  ax6 = plt.subplot(gs[6])
  ax6.plot(y, x)
  ax7 = plt.subplot(gs[7])
  ax7.plot(y, x)
  
  plt.tight_layout()
  plt.savefig('grid_figure.png')
  
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/aN20B.png" rel="noreferrer"><img src="https://i.stack.imgur.com/aN20B.png" alt="enter image description here"></a></p>