matplotlib / matplotlib/ipympl

figures are not closed in a notebook...

Open
#491 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
1.7k
Forks
234
PR merge metrics
No merged PRs in 30d

Description

I really like the %matplotlib widget extension for the interactivity it provides. However, the transition from %matplotlib inline to widget is not as smooth as I hoped for:

  • every cell that does some plotting should open a new figure (else a figure from a previously executed cell will be used)
  • when you reexecute a cell (often done in notebooks, meant for prototyping and education...) a new figure is made AND THE OLD ONE IS KEPT... shouldn't the old figure be removed/closed to stay in line with the inline matplotlib option?

Regards
Rein van den Boomgaard

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.

Research direction

Reproduce the behavior in a notebook using %matplotlib widget, comparing fresh and re-executed plotting cells with %matplotlib inline. Done means each plotting cell gets the expected figure and re-executing it does not leave the prior figure open; trace the widget entry point from this reproduction to identify the relevant code and regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.