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

Notebook rendered with Voila does not show Axes in a matplotlib widget

Abierto
#412 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
42/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
jupyter-notebook, python

Línea de trabajo

Comienza ejecutando el ejemplo mínimo reproducible con las versiones indicadas de ipympl, JupyterLab, ipywidgets y Voila; después, compara la salida del widget en JupyterLab y Voila. Se considera terminado cuando el widget de matplotlib renderizado por Voila muestra sus Axes y los datos representados igual que en JupyterLab.

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

Descripción

Describe the issue

When rendering a notebook using Voila, the interactive matplotlib widget using ipympl backend is also rendered. However this widget is completely missing the Axes, therefore not showing any data at all.

A minimum reproducible code would be

%matplotlib widget

plt.ioff()
figRHF = plt.figure(figsize=(10, 5))
figRHF.canvas.layout.min_height = '400px'
axRHF = figRHF.gca()
test = axRHF.plot([0, 1], [0, 1])
print(axRHF)
print(figRHF)
print(figRHF.gca())
print(test)

display(
    figRHF.canvas
)

And this is the output from this code, on the left is the Jupyter Lab notebook output, on the right is the Voila output
image

Versions

'3.8.12 | packaged by conda-forge | (default, Oct 12 2021, 21:22:46) [MSC v.1916 64 bit (AMD64)]'
ipympl version: 0.8.2

Selected Jupyter core packages...
IPython          : 7.29.0
ipykernel        : 6.5.0
ipywidgets       : 7.6.5
jupyter_client   : 6.1.12
jupyter_core     : 4.9.1
jupyter_server   : 1.11.2
jupyterlab       : 3.2.4
nbclient         : 0.5.9
nbconvert        : 6.3.0
nbformat         : 5.1.3
notebook         : 6.4.6
qtconsole        : not installed
traitlets        : 5.1.1

Known nbextensions:
  config dir: C:\Users\are014\Miniconda3\envs\humaninjurymodel\etc\jupyter\nbconfig
    notebook section
      ipydatetime/extension enabled 
      jupyter-matplotlib/extension enabled 
      voila/extension enabled 
      jupyter-js-widgets/extension enabled 

      - Validating: ok
      - Validating: ok
      - Validating: ok
      - Validating: ok
 
JupyterLab v3.2.4
C:\Users\are014\Miniconda3\envs\humaninjurymodel\share\jupyter\labextensions
        jupyter-matplotlib v0.10.2 enabled ok
        @jupyter-widgets/jupyterlab-manager v3.0.1 enabled ok (python, jupyterlab_widgets)
        @voila-dashboards/jupyterlab-preview v2.1.0 enabled ok (python, voila)

Other labextensions (built into JupyterLab)
   app dir: C:\Users\are014\Miniconda3\envs\humaninjurymodel\share\jupyter\lab
        jupyter-widget-datetime v1.2.0 enabled ok


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 Data Visualization

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.