title: Manipulating Legend in Pickled Matplotlib Figure
body: <p>Is it possible to manipulate a legend in a pickled matplotlib figure</p>
  
  <p>Eg, I plot a figure and then pickle it</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import pickle as pkl
  
  x = [1,2,3]
  y = [1,2,3]
  
  fig = plt.figure('plot')
  plt.plot(x,y, label = 'label')
  plt.legend(loc = 'best')
  
  pkl.dump(fig,file('plot.pkl','wb'))
  </code></pre>
  
  <p>I then load the pickled figure</p>
  
  <pre><code>fig = pkl.load(open('plot.pkl','rb'))
  plt.show()
  </code></pre>
  
  <p>I now need to extract the figure labels to use in an interactive widget. Any idea on how to do this?</p>
  
  <p>Thanks in advance!</p>