Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Follow-up to #343 - Embedding Static Plots

Abierto
#359 11 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

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

Línea de trabajo

Empieza leyendo cómo se gestionan las señales de guardado del notebook en jupyterlab-manager y widgetsnbextension, y después sigue el recorrido del frontend al backend de ipympl para actualizar el mimebundle. Comprueba el manejo del modelo del widget para el caso PNG. Se considera terminado cuando el estado guardado del widget se renderiza en lugar de mostrar una figura en blanco y las actualizaciones posteriores al renderizado se conservan al guardar el notebook y en nbconvert.

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

Descripción

#343 was a huge step forward for saving the state of plots in notebooks. But it doesn't truly reproduce the state of the notebook that the author was looking at for these two cases:

  1. If widget state is saved then only a blank figure renders (https://github.com/matplotlib/ipympl/pull/343#issuecomment-920167467)
  2. Any updates to the figure after the initial render are not saved in the notebook (https://github.com/matplotlib/ipympl/pull/343#issuecomment-921008926)

I think part 2 is very important to be able to tell a story using a notebook. e.g. If I make some plots with a slider, get them just so and then run nbconvert I don't think I would faithfully reproduce the state of the notebook as I was looking at it.

Part 1 should be solvable if we include the PNG as part of the widget model

Part 2 I think a reasonable tradeoff would be to only update the static plot whenever the notebook is saved. This would require the frontend of ipywidgets (jupyterlab-manager, and widgetsnbextension) to listen to notebook save signals and pass them to the ipympl frontend, which would in turn let the backend know to update the mimebundle.

@martinRenou how hard do you think the second one (saving) would be to fix? To me that feels like a very important thing to hit.

Lenguaje dominante
Jupyter Notebook
Estrellas
1.7k
Forks
234
Métricas de merge de PR
Sin PR fusionados en 30 d

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.

Más de matplotlib/ipympl

Todos los issues de matplotlib/ipympl

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.