title: Creating two completely independent plots in matplotlib and going back and forth between them
body: <p>I'd like to create two independent matplotlib plots within a python script, and potentially jump back and forth between them as I add lines, annotations, etc. to the various plots (for example, perhaps I call a function which adds lines to both plots, and then another function which adds the annotations). </p>
  
  <p>I expect that by working off matplotlib examples I'd be able to figure out some solution that works, but I'd like to know what the preferred and cleanest way of doing this is. I tend to get confused about when I should be doing things like </p>
  
  <pre><code>fig,ax=plt.subplots()
  </code></pre>
  
  <p>and when I should be doing things like:</p>
  
  <pre><code>fig=plt.figure()
  </code></pre>
  
  <p>Furthermore, how should I be switching back and forth between plots. If I did something like</p>
  
  <pre><code>fig1,ax1=plt.subplots()
  fig2,ax2=plt.subplots()
  </code></pre>
  
  <p>can I then just refer to these plots by doing something like:</p>
  
  <pre><code>ax1.plt.plot([some stuff])
  ax2.plt.plot([otherstuff]
  </code></pre>
  
  <p>? I ask this because often in the matplotlib examples they don't refer to the plot like this after calling plt.subplot() but instead call commands like</p>
  
  <pre><code>plt.plot([stuff])
  </code></pre>
  
  <p>where presumably it doesn't matter that they didn't specify ax1 or ax2 because there's only one plot in the example. At the end I'd like to save both plots to file using something like</p>
  
  <pre><code>plt.savefig(....)
  </code></pre>
  
  <p>although I need, again, to be able to refer to both plots independently. So what's the <em>proper</em> way of implementing this?</p>