title: How to plot data in background of multiple subplots in matplotlib
body: <p>I am trying to create a figure consisting of multiple subplots stacked on top of each other. However, I also want a single plot that runs through all the stacked subplots and shows up "behind" them. I'm not concerned about the actual y-values so it's fine that the y-axis is unreadable in this case. Below is what I have so far:</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  x = np.linspace(-1, 1, 100)
  y = x
  y2 = x**2
  y3 = x**3
  
  fig = plt.figure()
  ax1 = fig.add_axes([0.1, 0.1, 0.8, 0.4])
  ax2 = fig.add_axes([0.1, 0.5, 0.8, 0.4])
  ax3 = ax1.twinx()
  ax4 = ax2.twinx()
  
  
  ax1.plot(x, y)
  ax2.plot(x, y3)
  ax3.plot(x, y2)
  ax4.plot(x, y2)
  </code></pre>
  
  <p>Essentially, I want ax3 and ax4 to combine into one large plot that shows a single quadratic function while having a cubic function stacked on top of a linear function in the same figure. Ideally, I'll have three actually separate axes since I'll want to be customizing and performing actions to one subplot without affecting the other two in the future.<a href="https://i.stack.imgur.com/kBYSN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kBYSN.png" alt="enter image description here"></a></p>
  
  <p>Thanks!</p>