matplotlib / matplotlib/ipympl
(Auto-)Resize plots that start too large
Personne n'a encore pris cette issue.
- Langage dominant
- Jupyter Notebook
- Étoiles
- 1.7k
- Forks
- 234
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
## 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:

## Versions
jupyterlab==3.2.8
jupyterlab-widgets==1.0.2
ipympl==0.8.7
ipywidgets==7.6.5
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par examiner la barre d’outils des figures de ipympl et la manière dont JupyterLab affiche des figures côte à côte. Comparez les approches proposées pour rendre un graphique surdimensionné utilisable, puis définissez le comportement attendu lors du redimensionnement et vérifiez-le dans les versions indiquées de JupyterLab, ipywidgets et ipympl ; l’issue ne mentionne aucun fichier ni test.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- jupyter, jupyter-notebook
- Domaine
- data-visualization, frontend
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100