title: how to add a plot on top of another plot in matplotlib?
body: <p>I have two files with data: datafile1 and datafile2, the first one always is present and the second one only sometimes.  So the plot for the data on datafile2 is defined as a function (geom_macro) within my python script. At the end of the plotting code for the data on datafile1 I first test that datafile2 is present and if so, I call the defined function.  But what I get in the case is present, is two separate figures and not one with the information of the second one on top of the other.
  That part of my script looks like this:</p>
  
  <pre><code>f = plt.figuire()
  &lt;in this section a contour plot is defined of datafile1 data, axes, colorbars, etc...&gt;
  
  if os.path.isfile('datafile2'):
      geom_macro()
  
  plt.show()
  </code></pre>
  
  <p>The "geom_macro" function looks like this:</p>
  
  <pre><code>def geom_macro():
      &lt;Data is collected from datafile2 and analyzed&gt;
      f = plt.figure()
      ax = f.add_subplot(111)
      &lt;annotations, arrows, and some other things are defined&gt;
  </code></pre>
  
  <p>Is there a way like "append" statement used for adding elements in a list, that can be used within matplotlib pyplot to add a plot to an existing one?
  Thanks for your help!</p>