Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Milestone
Description
Bug report
Bug summary
Usingipywidgets.interact
to update a figure works as expected inmatplotlib<=3.3.1
, but fails inmatplotlib==3.3.2
.
I don't think this is anipywidgets
issue since downgradingmatplotlib
fixes this issue.
Code for reproduction
In[1]:
%matplotlibnotebookimportmatplotlibasmplimportmatplotlib.pyplotaspltimportipywidgetsasipyw"works if %s <= 3.3.1"%mpl.__version__
In[2]:
fig=plt.figure()@ipyw.interact(m=ipyw.FloatSlider(value=1,min=-10,max=10,step=0.01))defupdate(m):plt.figure(fig.number,clear=True)plt.plot([m*xforxinrange(-9,10)])
Followed by moving the slider.
Actual outcome
- when moving the slider, the figure does not update
- a second figure is sometimes created instead
- the second figure is usually blank, but sometimes updates instead
Expected outcome
- the original figure updates as it does in
matplotlib==3.3.1
Matplotlib version
- Operating system: Ubuntu
- Matplotlib version: 3.3.2 vs 3.3.1
- Matplotlib backend (
print(matplotlib.get_backend())
): nbAgg - Python version: 3.7.8
- Jupyter version (if applicable): jupyter-core==4.6.3
- Other libraries: ipywidgets==7.5.1
- Installation source:
conda
channelconda-forge