matplotlib / matplotlib/ipympl
ipympl does not work in JupyterLite
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
Due to a dependency on `tornado` https://github.com/matplotlib/matplotlib/blob/c06e8709dde6504d396349c0c80ef019c88c3927/lib/matplotlib/backends/backend_webagg_core.py#L22, ipympl does not work in [JupyterLite](https://github.com/jtpio/jupyterlite)
We might be able to implement a custom Timer https://github.com/matplotlib/matplotlib/blob/c06e8709dde6504d396349c0c80ef019c88c3927/lib/matplotlib/backends/backend_webagg_core.py#L118 based entirely on `asyncio` (which works on JupyterLite).
## Workaround
As a workaround, one could do
```python
import sys
import types
sys.modules['tornado'] = types.ModuleType('tornadofake')
```
Disclaimer, I would not be held responsible for anything that would go wrong if you copy this code!
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 mit matplotlibs lib/matplotlib/backends/backend_webagg_core.py, insbesondere mit der tornado-Abhängigkeit nahe Zeile 22 und dem Timer um Zeile 118. Prüfe, wie ipympl dieses Backend in JupyterLite erreicht, und verifiziere anschließend, dass die Integration dort ohne tornado funktioniert und interaktive Timer weiterhin mithilfe der verfügbaren asyncio-Unterstützung funktionieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- jupyter-notebook, python
- Bereich
- frontend, web-dev
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100