title: Deleting Unnecessary Vertical White Space within Plot
body: <p>I want to create a figure that consists of 7 plots, 5 boxplots and 2 histograms. The first four boxplots are in the first two rows, followed by a row for the two histograms, and in the last row the last boxplot (figure below). When I try to create this in <code>matplotlib</code>, however, it creates a ton of vertical white space that is unnecessary (red rectangles in the provided images). I want to delete them, i.e. there should be as little as possible top and bottom white space in the plots. I have tried a few things, but nothing seems to work, <a href="https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.subplots_adjust.html" rel="nofollow noreferrer"><code>subplot_adjust</code></a> (this seems to be the closest to what I want), <a href="https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.axes.Axes.margins.html?highlight=margin#matplotlib.axes.Axes.margins" rel="nofollow noreferrer"><code>margin</code></a>. The link to my python code so far is below, with additional two links on this topic. Thank you for your help!</p>
  
  <pre class="lang-py prettyprint-override"><code>import numpy as np
  import matplotlib.pyplot as plt
  
  
  dist = np.random.normal(0, 1, 1000)
  
  
  
  FONT_SIZE = "xx-large"
  
  fig = plt.figure(figsize=(16, 26))
  fig.tight_layout()
  
  gs = fig.add_gridspec(4, 2)
  
  
  fig_ax1 = fig.add_subplot(gs[0, 0])
  fig_ax1.boxplot(
      dist,
      notch=True,
      vert=False)
  
  fig_ax2 = fig.add_subplot(gs[0, 1])
  fig_ax2.boxplot(
      dist,
      notch=True,
      vert=False)
  
  
  fig_ax3 = fig.add_subplot(gs[1, 0])
  fig_ax3.boxplot(
      dist,
      notch=True,
      vert=False)
  
  
  fig_ax4 = fig.add_subplot(gs[1, 1])
  fig_ax4.boxplot(
      dist,
      notch=True,
      vert=False)
  
  
  
  fig_ax5 = fig.add_subplot(gs[2, 0])
  fig_ax5.hist(
      dist,
      bins=60)
  fig_ax5.set_xlim(0, 0.02)
  
  
  fig_ax6 = fig.add_subplot(gs[2, 1])
  fig_ax6.hist(
      dist,
      bins=60)
  
  
  
  fig_ax7 = fig.add_subplot(gs[3, :])
  fig_ax7.boxplot(
      dist,
      notch=True,
      vert=False)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/9jQX8.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9jQX8.gif" alt="enter image description here"></a></p>
  
  <p><a href="https://pastebin.com/zV44UrsM" rel="nofollow noreferrer">Python code for the Figure</a></p>
  
  <p>Some links for that issue.</p>
  
  <p><a href="https://github.com/matplotlib/matplotlib/issues/1912" rel="nofollow noreferrer">Matplotlib Issue on Margins</a></p>
  
  <p><a href="https://matplotlib.org/3.1.1/gallery/subplots_axes_and_figures/axes_margins.html#sphx-glr-gallery-subplots-axes-and-figures-axes-margins-py" rel="nofollow noreferrer">Zooming in and out using Axes.margins and the subject of "stickiness"</a></p>