matplotlib / matplotlib/ipympl
ipympl not working nicely with interact
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
Trying to follow some simple examples of Jupyter widgets with matplotlib, but I'm having issues when using the `ipympl` backend. The first update to a plot produces a second plot (overplotted), and the second update just erases the figure window altogether. This does not happen when using `inline`.
Here's some simple code to reproduce the issue:
%matplotlib ipympl
import matplotlib.pyplot as plt
from ipywidgets import interact
def f(n):
plt.plot([0,1,2],[0,1,n])
plt.show()
interact(f,n=(0,10));
If I use `inline`, this will update the line plot. With `ipympl` it fails.
I am using ipympl 0.1.0 from Anaconda, together will other packages:
ipywidgets 7.0.0 py36_intel_0 [intel] intel
ipympl 0.1.0 py36_1 conda-forge
matplotlib 2.0.2 np113py36_intel_1 [intel] intel
ipython 6.1.0 py36_intel_0 [intel] intel
jupyter 1.0.0 py36_intel_5 [intel] intel
jupyter_client 5.1.0 py36_intel_0 [intel] intel
jupyter_console 5.1.0 py36_intel_0 [intel] intel
jupyter_core 4.3.0 py36_intel_1 [intel] intel
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
Führe den bereitgestellten ipympl- und interact-Reproduzierer aus und vergleiche anschließend sein Verhalten bei der Aktualisierung der Abbildung mit dem des inline backend. Verfolge den am wiederholten Aufrufen von interact beteiligten ipympl-Backend- und Widget-Aktualisierungspfad; abgeschlossen ist die Aufgabe, wenn die Aktualisierungen einen Plot sichtbar halten, ohne die Abbildung zu löschen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- jupyter, jupyter-notebook, python
- Bereich
- data-visualization, frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100