title: Creating a subplot below a plot with an inset graph in python
body: <p>I currently have the graph attached. I want a separate graph underneath this one showing the difference between the two lines to visually show the functional approach to error analysis. </p>
  
  <p>How do I add a subplot below this graph with a space and new axes without effecting the size and shape of my current graph.<a href="https://i.stack.imgur.com/QlqQ2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QlqQ2.png" alt="enter image description here"></a></p>
  
  <p>My current code is: </p>
  
  <pre><code>fig, ax = plt.subplots()
  plt.plot(x, y1, label = 'label1')
  plt.plot(x, y2, label = 'label2')
  plt.plot(x, y3, label = 'label2')
  
  plt.xlabel(u'Redshift (z)', fontname = 'Times New Roman', size = 15)
  plt.ylabel(u'Look-back Time (yrs)', fontname = 'Times New Roman', size = 15)
  
  legend = plt.legend(loc='lower right', shadow=True, fontsize='large')
  axins = zoomed_inset_axes(ax, 4.5, loc=10)
  
  axins.plot(x, y1, label = 'label1')
  axins.plot(x, y2, label = 'label2')
  axins.plot(x, y3, label = 'label2')
  
  x1, x2, y1, y2 = 2, 2.5, 1.25*10**10, 1.3*10**10
  
  axins.set_xlim(x1, x2)
  axins.set_ylim(y1, y2)
  
  mark_inset(ax, axins, loc1=1, loc2=3, fc="none", ec="0.5")
  
  plt.show()
  </code></pre>
  
  <p>When I try to add a subplot below I used this code:</p>
  
  <pre><code>plt.subplot(212)
  plt.plot(yaxis, difference(y2, y3))
  plt.subplots_adjust(bottom = 0.1, hspace=5)
  </code></pre>
  
  <p>It just creates a smaller plot in a new figure. Where as I want one to be underneath the other. </p>