Interactive matplotlib in jupyterlab no longer working

I noticed the same recently, and so I made a small experiment to summarize what was working where, and here it is

of course you need to pip install ipympl to use either widget or ipympl

for that reason I’m going to switch to using
%matplotlib ipympl
because it also works in the context of vs-code, and it’s often handy to be able to use vs-code as well…

frontend %matplotlib works ?
nb6 notebook YES
widget YES
ipympl YES
nb7 notebook KO - IPython is not defined
widget YES
ipympl YES
jlab4 notebook KO - IPython is not defined
widget YES
ipympl YES
vscode notebook KO
widget KO
ipympl YES
2 Likes