matplotlib / matplotlib/ipympl
ipympl 0.8.2 - ginput() does not work on Jupyterlab / returns an empty array
Nessuno ha ancora preso questa issue.
- Lingua principale
- Jupyter Notebook
- Stelle
- 1.7k
- Fork
- 234
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia eseguendo la riproduzione minima dell'issue con il backend %matplotlib widget in JupyterLab su Firefox. Indaga sul motivo per cui plt.ginput(3) restituisce un array vuoto e la figura appare solo dopo il timeout; il lavoro è completato quando i clic del mouse producono le coordinate e i marcatori a croce rossi previsti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- jupyter-notebook
- Ambito
- frontend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100