IPython: How to show the same plot in different cells?
I have found a solution! Basically you create a figure and the axis with fig, ax = plt.subplots()
and then use the ax
variable to draw (potentially in multiple cells). In any of the cells you want to replot the figure, just write fig
as the last line of the cell, resulting in the cell using the updated figure as output.
See my answer here for more details.