matplotlib / matplotlib/ipympl

(Auto-)Resize plots that start too large

Abierto
#431 7 comentarios 2 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

Describe the issue

Plots by default are sometimes too large, and the right side is cut off (e.g. when using the sexy Jupyter Lab side-by-side rendering or just using a small screen. Obviously you then want to resize them. However, since the resize handle is at the bottom right, it is also not visible. So the only current solution is to manually change the figure size in the code and re-run until it is visible. Not an ideal solution; sometimes you may not have direct access to the code creating the figure.

Some possible solutions:

  • add a horizontal scrollbar (probably would need to be done on the JupyterLab side)
  • introduce an auto-resize feature in the ipympl figure toolbar that will automatically resize the figure to the available width when pressed
  • auto resize all newly created figures, maybe activatable by an "%ipympl autoresize" magic method
  • make the handle location configurable
  • scale the entire figure such that all of it is always visible (probably doesn't work too well with manual resizing), just like for inline plots

The current state is rather frustrating.

Example:
image

Versions

jupyterlab==3.2.8
jupyterlab-widgets==1.0.2
ipympl==0.8.7
ipywidgets==7.6.5

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

Empieza revisando la barra de herramientas de figuras de ipympl y cómo JupyterLab representa figuras una al lado de la otra. Compara los enfoques propuestos para hacer utilizable un gráfico sobredimensionado, después define el comportamiento previsto al cambiar el tamaño y verifícalo en las versiones indicadas de JupyterLab, ipywidgets e ipympl; el issue no menciona archivos ni tests.

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

Evaluación

Stack tecnológico
jupyter, jupyter-notebook
Área
data-visualization, 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.