Many plots just doesn't need to be interactive so I tried to change them to inline plots.
I tried the following without success:
plt.close(fig). It clear the figureplt.ioff(), failedwrap codes between
%matplotlib inline%matplotlib notebook. It close other interactive plots
