We do not need plt.ioff() or plt.show() (if we use %matplotlib inline ). You can check the code above plt.ioff() . plt.close() plays a significant role. Try the following:
%matplotlib inline import pylab as plt
If you run this code in iPython, it will display a second graph, and if you add plt.close(fig2) to the end of it, you will not see anything.
In conclusion , if you close the digit on plt.close(fig) , it will not be displayed.
Mojtaba Khodadadi Aug 6 '15 at 1:23 2015-08-06 01:23
source share