matplotlib / matplotlib/ipympl
ipympl 0.8.2 - ginput() does not work on Jupyterlab / returns an empty array
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Jupyter Notebook
- Estrellas
- 1.7k
- Forks
- 234
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza ejecutando la reproducción mínima del issue con el backend %matplotlib widget en JupyterLab en Firefox. Investiga por qué plt.ginput(3) devuelve un array vacío y la figura aparece solo después del timeout; se considera terminado cuando los clics del ratón producen las coordenadas y las marcas de cruz rojas esperadas.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- jupyter-notebook
- Área
- frontend
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100