matplotlib / matplotlib/ipympl
ipympl 0.8.2 - ginput() does not work on Jupyterlab / returns an empty array
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 bug
I should be able to select data points from a figure and then red crosses are supposed to appear after clicking with the mouse, but nothing happens, an empty array is returned and the figures only appear after the timeout of ginput().
Expected behavior
Figure pops up and I can click with the mouse on the figure to select data points. An array will be generated
To Reproduce
%matplotlib widget
import matplotlib.pyplot as plt
import numpy as np
t = np.arange(10)
plt.plot(t, np.sin(t))
plt.title('matplotlib.pyplot.ginput()\
function Example', fontweight ="bold")
print("After 3 clicks :")
x = plt.ginput(3)
print(x)
plt.show()
My Platform
Firefox on Arch Linux, latest version after system update.
I tested it on Jupyterlab, I did not test it on Jupyter-notebook.
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, die minimale Reproduktion des Issues mit dem %matplotlib widget-Backend in JupyterLab unter Firefox auszuführen. Untersuche, warum plt.ginput(3) ein leeres Array zurückgibt und die Figure erst nach dem Timeout erscheint; abgeschlossen ist die Aufgabe, wenn Mausklicks die erwarteten Koordinaten und roten Kreuzmarkierungen erzeugen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- jupyter-notebook
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100