title: Matplotlib - how to combine a list of AxesSubplot into one figure with multiple subplots?
body: <p>I have generated a list of matplotlib AxesSubplot object and I would like to combine them into one figure with a subplot for each AxesSubplot object.
  Let's say I have 9 AxesSubplot object stored in a python list called "axlist" and I want to display them together in a 3x3 grid:</p>
  
  <pre><code>def random_figure_generator(n):
      """
      Create n random plots
      """
      axlist = list()
      for i in range(n):
          fig, ax = plt.subplots()
          x = sorted(np.random.random(100))
          ax.plot(np.linspace(0,100,100), np.random.random(100))
          plt.show(fig)
          plt.close(fig)
          axlist.append(ax)
      return axlist
  
  #Create a list of axes object 
  axlist = random_figure_generator(9)
  
  #Attempt to combine them
  axes = []
  fig, axes = plt.subplots(3,3)
  axes = axes.flatten()
  for i in range(len(axlist)):
      axes[i].axes = axlist[i] #try to assign each AxesSubplot object to one subplot in the new figure
  plt.show()
  </code></pre>
  
  <p>And here is what I get:
  <a href="https://i.stack.imgur.com/o5PDJ.png" rel="nofollow noreferrer">Figure with 3x3 subplots</a></p>