Matplotlib Jupyter Extension

0.10.0 · active · verified Sat Apr 11

ipympl is a Matplotlib Jupyter Extension that leverages the Jupyter interactive widgets framework to enable interactive features of Matplotlib within Jupyter Notebooks, JupyterLab, Google Colab, and VSCode notebooks. It provides a proper Jupyter interactive widget for figure canvases, allowing them to be positioned in interactive widget layouts. The library is actively maintained with regular releases, currently at version 0.10.0.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to activate the ipympl backend using the Jupyter magic command and create a basic interactive Matplotlib plot. Run this code in a Jupyter Notebook or JupyterLab environment to see the interactive features.

import matplotlib.pyplot as plt
import numpy as np

%matplotlib ipympl

fig, ax = plt.subplots()
x = np.linspace(0, 2 * np.pi, 100)
y = np.sin(3 * x)
ax.plot(x, y)
plt.show()

view raw JSON →