mikecroucher / jupyter-interactions

A repository of jupyter interactions
3 stars 9 forks source link

Interactions create many copies #37

Open jezcope opened 7 years ago

jezcope commented 7 years ago

I've just been trying these notebooks out on IPython 6.0 and run into ipython/ipython#10376, which causes each change to a widget to append a new plot instead of replacing what came before.

Long story short, until they make a better fix each interaction using matplotlib needs to include plt.show() after it's finished setting up the plot, in order to flush the previous plots. I'm happy to make a pull request, but not sure of the implications of editing notebooks on a more recent version of IPython and resubmitting.

mikecroucher commented 7 years ago

Give it a try and we'll see :)

marcinofulus commented 7 years ago

I call IPython.core.display.display on a figure with plt.interactive(False). It seems to keep one figure and gives some control on display.