Graph not showing when add in %matplotlib notebook using Jupyter in VS Code

294 Views Asked by At

When using Jupyter on VS Code, when I add in %matplotlib notebook, the graph would not show at all

When I start to plot without the magic everything is working fine. When graph is not showing after adding %matplotlib notebook, removing the magic will not make the graph reappear. I have to reload the VS code window and restart the kernel.

1

There are 1 best solutions below

0
Wayne On

Did you install ipympl and try %matplotlib ipympl or %matplotlib widget, as discussed here?

See here and here and here for more about getting this to work with VS Code. Especially the bottom section of the table there where the results of testing various approaches in VS Code are shown.