matplotlib / matplotlib/ipympl

make `%matplotlib widget` behave like `inline`?

Abierto
#171 11 comentarios 10 reacciones 0 asignados Ver en GitHub

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

I have a notebook in Jupyter Lab, so far using the default matplotlib backend, which in this context I believe is `inline`. When I have a sequence of plotting commands (`pyplot.plt` etc.), they combine into a figure that is shown after the respective code cell. Also, `@interact` works as expected.

I now wanted to zoom in, which `inline` does not support, so I issued `%matplotlib widget`. The figures are now zoomable alright, but I don't have that neat behavior where plotting code in one cell contributed to the following figure output cell, and doesn't modify anything else. And `@interact`, instead of producing new (versions of) a figure, now puts everything on top of each other.

From reading around I realize that this is the intended behavior. The thing is, I don't like it. So my question is: __Is there a way to make `widget` behave like `inline`?__

If there is not, is there a guide that tells me how to modify my code so that plot commands affect only the next output cell, and `@interact` updates instead of adds?

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza reproduciendo el comportamiento en Jupyter Lab con `%matplotlib widget`, comandos de trazado secuenciales y `@interact`; después, compáralo con el inline backend predeterminado. Determina si se pueden admitir la salida limitada a la celda solicitada y la interacción con actualización; se considera terminado cuando se documente un enfoque compatible o se identifique claramente el cambio de comportamiento necesario.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
jupyter, jupyter-notebook
Área
developer-experience, frontend
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.