Plot disappears after executing cell second time
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- jupyter-notebook, matplotlib, python
- Domaine
- data-visualization
Piste de recherche
Commencez par reproduire les deux exemples de cellules de notebook dans JupyterLab et Jupyter Notebook avec les backends widget et inline signalés. Comparez les exécutions répétées de la cellule de tracé et confirmez que le tracé basé sur widget reste visible et est à nouveau rendu comme prévu sans réexécuter la cellule de sélection du backend.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
If I have a plot in a notebook cell, and execute it twice, the plot output disappears. This is not what is expected. For example, using this code in one jupyter notebook cell:
%matplotlib widget
import matplotlib.pyplot as plt
and this in another cell:
x = [0, 1, 2, 3]
y = [0, 1, 2, 3]
plt.plot(x, y)
The first time I run this, everything plots fine. But when I execute the second cell twice (or any following calls), the plot disappears. The expected behaviour is that it re-plots (using a different colour). If I then re-run the first cell (with %matplotlib widget), and then the second cell again, it works (but this basically just resets the plot).
If I include a plot command in the first cell, then I can re-run the second cell as many times as I want and it works as expected.
This does not happen if I use %matplotlib inline. I've tested in both jupyter lab and jupyter notebook. My versions are the following:
matplotlib 2.2.2 py36_1 conda-forge
ipympl 0.2.1 py36_0 conda-forge
@jupyter-widgets/jupyterlab-manager
@jupyter-widgets/jupyterlab-manager v0.35.0 enabled OK
- Langage dominant
- Jupyter Notebook
- Étoiles
- 1.7k
- Forks
- 234
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire 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.
Autres issues de matplotlib/ipympl
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
matplotlib/ipympl#623 · 1 commentaire ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
matplotlib/ipympl#622 · 13 commentaires ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 42/100
matplotlib/ipympl#612 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
matplotlib/ipympl#611 · 4 commentaires ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 42/100
matplotlib/ipympl#609 · 7 commentaires ·
Toutes les issues de matplotlib/ipympl
Issues similaires
-
vcftools filter.summary bugOuvertebug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 3 jours
-
brushX with `values` can shorten the selection range when it’s dragged to the plot edgePeut-être pris @andersk l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
PedestrianDynamics/pyFDS-Evac#647 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour