-
Notifications
You must be signed in to change notification settings - Fork 314
Using %matplotlib widget instead of %matplotlib notebook,tk,etc
Rich Chiodo edited this page Dec 6, 2021
·
9 revisions
Matplotlib supports specifying a backend for rendering matplotlib graphs through the use a %matplotlib <backend>
line magic. Most of these implementations will shell out to an interactive window when plotting.
Some of the backend options do not work always work well in VS code.
VS code should work with these two options (has been thoroughly tested):
-
%matplotlib inline
- This is the default and will render images as PNGs -
%matplotlib widget
- This generates an ipywidget that renders plots in a control. Multiple plots and zooming are supported. For more information see the README
VS code may sometimes work with these options (has been tried at least once):
%matplotlib qt5
VS code hangs with these options:
%matplotlib tk
VS code does nothing with these options:
%matplotlib notebook
- Contribution
- Source Code Organization
- Coding Standards
- Profiling
- Coding Guidelines
- Component Governance
- Writing tests
- Kernels
- Intellisense
- Debugging
- IPyWidgets
- Extensibility
- Module Dependencies
- Errors thrown
- Jupyter API
- Variable fetching
- Import / Export
- React Webviews: Variable Viewer, Data Viewer, and Plot Viewer
- FAQ
- Kernel Crashes
- Jupyter issues in the Python Interactive Window or Notebook Editor
- Finding the code that is causing high CPU load in production
- How to install extensions from VSIX when using Remote VS Code
- How to connect to a jupyter server for running code in vscode.dev
- Jupyter Kernels and the Jupyter Extension