You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if it is possible to make it so that before (or after) each cell a certain function is run?
For example, I always use %matplotlib notebook for interactive plots, but when I want to do a new plot in a new cell, I must either again execute %matplotlib notebook or close all plots by running plt.close("all"), otherwise the plots gets shown in the previous interactive window. It would be very convenient to have Jupyter run plt.close("all") before (or after) each cell in this case.
I'm surely not the only one annoyed by this %matplotlib notebook behaviour (see #1151) and in this case it might just be a long-running bug with that, but and in general there certainly are other uses for some kind of before/after cell hooks.
What do you think?
The text was updated successfully, but these errors were encountered:
Hi,
I was wondering if it is possible to make it so that before (or after) each cell a certain function is run?
For example, I always use
%matplotlib notebook
for interactive plots, but when I want to do a new plot in a new cell, I must either again execute%matplotlib notebook
or close all plots by runningplt.close("all")
, otherwise the plots gets shown in the previous interactive window. It would be very convenient to have Jupyter runplt.close("all")
before (or after) each cell in this case.I'm
surelynot the only one annoyed by this%matplotlib notebook
behaviour (see #1151)and in this case it might just be a long-running bug with that, butand in general there certainly are other uses for some kind of before/after cell hooks.What do you think?
The text was updated successfully, but these errors were encountered: