matplotlib / matplotlib/ipympl
Unable to show figures in VS Code
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Jupyter Notebook
- Sterne
- 1.7k
- Forks
- 234
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Describe the issue
In VS Code Jupyter Notebook, after using %matplotlib widget or %matplotlib ipympl, no figures will show.
Minimal example:
# Enabling the `widget` backend.
# This requires jupyter-matplotlib a.k.a. ipympl.
# ipympl can be install via pip or conda.
%matplotlib widget
import matplotlib.pyplot as plt
import numpy as np
# Testing matplotlib interactions with a simple plot
fig = plt.figure()
plt.plot(np.sin(np.linspace(0, 20, 100)))
Versions
3.13.3 (main, Apr 8 2025, 13:54:08) [Clang 19.1.7 ]
ipympl version: 0.9.7
Selected Jupyter core packages...
IPython : 9.2.0
ipykernel : 6.29.5
ipywidgets : 8.1.7
jupyter_client : 8.6.3
jupyter_core : 5.7.2
jupyter_server : 2.16.0
jupyterlab : 4.4.2
nbclient : 0.10.2
nbconvert : 7.16.6
nbformat : 5.10.4
notebook : 7.4.2
qtconsole : not installed
traitlets : 5.14.3
JupyterLab v4.4.2
/Volumes/Workspace/be-project/data/.venv/share/jupyter/labextensions
jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
jupyter-matplotlib v0.11.7 enabled OK
@jupyter-notebook/lab-extension v7.4.2 enabled OK
@jupyter-widgets/jupyterlab-manager v5.0.15 enabled OK (python, jupyterlab_widgets)
(jupyter nbextension results "Jupyter command jupyter-nbextension not found.")
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das minimale Notebook-Beispiel in VS Code mit %matplotlib widget oder %matplotlib ipympl unter Verwendung der aufgeführten Versionen von Python, ipympl, JupyterLab und der Erweiterung zu reproduzieren. Vergleiche das Ergebnis mit dem gemeldeten Verhalten; als erledigt gilt die Aufgabe, wenn die interaktive Abbildung in VS Code gerendert wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- jupyter-notebook, numpy, python, vscode
- Bereich
- devtools, frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100