Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

matplotlib>=3.3.2 breaksipywidgets.interact #18638

Closed
casperdcl/brainweb
#11
@casperdcl

Description

@casperdcl

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 inmatplotlib==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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp