Plot output with ipywidgets formatting incorrectly
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Run the supplied notebook script with the listed working and broken matplotlib/ipympl versions, then compare the HBox layout and widget formatting. Done means the figure and buttons render correctly together in the HBox under the affected versions.
Written by the indexing model from the issue text.
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
%matplotlib widget
from IPython.display import display, HTML
display(HTML("<style>.container { width:100%!important;}</style>"))
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)
matplotlib == 3.5.1
- Dominant language
- Jupyter Notebook
- Stars
- 1.7k
- Forks
- 234
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from matplotlib/ipympl
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
matplotlib/ipympl#623 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
matplotlib/ipympl#622 · 13 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
matplotlib/ipympl#612 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
matplotlib/ipympl#611 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
matplotlib/ipympl#609 · 6 comments ·
All issues in matplotlib/ipympl
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
task
Difficulty 2/5 1-3 hours Newbie friendliness 86/100