matplotlib / matplotlib/ipympl
make `%matplotlib widget` behave like `inline`?
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
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?
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 reproduire le comportement dans Jupyter Lab avec `%matplotlib widget`, des commandes de tracé séquentielles et `@interact`, puis comparez-le avec le inline backend par défaut. Déterminez si la sortie limitée à la cellule demandée et l’interaction avec mise à jour peuvent être prises en charge ; le travail est terminé lorsqu’une approche prise en charge est documentée ou que le changement de comportement requis est clairement identifié.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- jupyter, jupyter-notebook
- Domaine
- developer-experience, frontend
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100