Skip to content

Using %matplotlib widget instead of %matplotlib notebook,tk,etc

Rich Chiodo edited this page Dec 4, 2021 · 9 revisions

Matplotlib supports specifying a renderer in a notebook cell. Most of these implementations will shell out to an interactive window when plotting.

Some of the interactive options do not work within in VS code.

VS code supports two options

  • %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
Clone this wiki locally