title: Matplotlib save file to be reedited later in ipython
body: <p>Is there a way to save the 'state' of a matplotlib figure so that I may open up the plot and interact with it later, e.g. in a new ipython notebook session.</p>
  
  <p>Plotting pdfs and other file formats doesn't quite do justice if you want to edit the figure later.</p>
  
  <p>This would be useful if you want to annotate or rescale a figure later, but you don't necessarily have all the access to the original script/data that produced the figure.</p>
  
  <p>In matlab, which ipython is often reported to try to emulate in many ways, you can simply save the file as a <code>.fig</code> or even a script, like <code>.m</code> (matlab) file! then you reopen your <code>.m</code> or <code>.fig</code> in a later matlab session and edit it.</p>
  
  <p>Can this be done with matplotlib?</p>