matplotlib / matplotlib/ipympl
Plot output with ipywidgets formatting incorrectly
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
I built a small GUI within a notebook and had two figures in an ipywidgets HBox object. the latest version of ipympl made it so I could not have both figures in an HBox and generally disrupted the formatting of the object. I was able to fix the issue by reverting both matplotlib and the ipympl versions.
a short script that generates the broken output is as follows
```python
%matplotlib widget
from IPython.display import display, HTML
display(HTML(".container { width:100%!important;}"))
import ipywidgets as ipy
import matplotlib.pyplot as plt
import numpy as np
out1 = ipy.Output()
b1 = ipy.Button(description = 'button1')
b2 = ipy.Button(description = 'button2')
x = np.linspace(0,7,21)
y = np.sin(x)
with out1:
fig,ax = plt.subplots()
ax.plot(x,y)
display(ipy.HBox([out1,ipy.VBox([b1,b2])]))
```
## Versions
(working version)
```
ipympl == 0.5.8
matplotlib == 3.3.3
```
(broken version)
```ipympl == 0.8.8
matplotlib == 3.5.1
```
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
Exécutez le script du notebook fourni avec les versions de matplotlib/ipympl fonctionnelle et défaillante indiquées, puis comparez la disposition de HBox et le formatage des widgets. La tâche est terminée lorsque la figure et les boutons s’affichent correctement ensemble dans HBox avec les versions concernées.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- jupyter-notebook, matplotlib, python
- Domaine
- frontend
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100