title: Jupyter: Replot in different cell
body: <p>I'd like to do something like this:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  %matplotlib inline
  fig1 = plt.figure(1)
  plt.plot([1,2,3],[5,2,4])
  plt.show()
  </code></pre>
  
  <p>In one cell, and then redraw the exact same plot in another cell, like so:</p>
  
  <pre><code>plt.figure(1) # attempting to reference the figure I created earlier...
  # four things I've tried:
  plt.show() # does nothing... :(
  fig1.show() # throws warning about backend and does nothing
  fig1.draw() # throws error about renderer
  fig1.plot([1,2,3],[5,2,4]) # This also doesn't work (jupyter outputs some 
  # text saying matplotlib.figure.Figure at 0x..., changing the backend and 
  # using plot don't help with that either), but regardless in reality
  # these plots have a lot going on and I'd like to recreate them 
  # without running all of the same commands over again.
  </code></pre>
  
  <p>I've messed around with some combinations of this stuff as well but nothing works.</p>
  
  <p>This question is similar to <a href="https://stackoverflow.com/questions/38754107/ipython-how-to-show-the-same-plot-in-different-cells">IPython: How to show the same plot in different cells?</a> but I'm not particularly looking to <strong>update</strong> my plot, I just want to redraw it.</p>