Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

ipympl not working nicely with interact

Open
#36 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
jupyter, jupyter-notebook, python

Research direction

Run the supplied ipympl and interact reproducer, then compare its figure-update behavior with the inline backend. Trace the ipympl backend and widget update path involved in repeated interact calls; done means updates keep one plot visible without erasing the figure.

Written by the indexing model from the issue text.

Description

Trying to follow some simple examples of Jupyter widgets with matplotlib, but I'm having issues when using the ipympl backend. The first update to a plot produces a second plot (overplotted), and the second update just erases the figure window altogether. This does not happen when using inline.

Here's some simple code to reproduce the issue:

%matplotlib ipympl
import matplotlib.pyplot as plt
from ipywidgets import interact

def f(n):
    plt.plot([0,1,2],[0,1,n])
    plt.show()
interact(f,n=(0,10));

If I use inline, this will update the line plot. With ipympl it fails.

I am using ipympl 0.1.0 from Anaconda, together will other packages:

ipywidgets                7.0.0              py36_intel_0  [intel]  intel
ipympl                    0.1.0                    py36_1    conda-forge
matplotlib                2.0.2           np113py36_intel_1  [intel]  intel
ipython                   6.1.0              py36_intel_0  [intel]  intel
jupyter                   1.0.0              py36_intel_5  [intel]  intel
jupyter_client            5.1.0              py36_intel_0  [intel]  intel
jupyter_console           5.1.0              py36_intel_0  [intel]  intel
jupyter_core              4.3.0              py36_intel_1  [intel]  intel
Dominant language
Jupyter Notebook
Stars
1.7k
Forks
234
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from matplotlib/ipympl

All issues in matplotlib/ipympl

Similar issues

More Data Visualization issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.