Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to suppress matplotlib inline for a single cell in Jupyter Notebooks/Lab?

I was looking at matplotlib python inline on/off and this kind of solves the problem but when I do plt.ion() all of the Figures pop up (100s of figures). I want to keep them suppressed in a single cell. Is there a with loop I can use to turn off %matplotlib inline or is this impossible?

like image 855
O.rka Avatar asked Nov 17 '22 16:11

O.rka


1 Answers

Figures closed before the end of the cell will not be shown. Calling plt.close("all") at the end of the cell will close all figures and none will be displayed in the cell's output.

like image 167
mrawlik Avatar answered Dec 19 '22 03:12

mrawlik