10000 nbagg backend: multiple execution of same cell with plots · Issue #4457 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
nbagg backend: multiple execution of same cell with plots #4457
Closed
@tritemio

Description

@tritemio

When using matplotlib in the Jupyter Notebook with the notebook (or nbagg) backend, multiple re-executions of of a cell (containing a plot) cause some problems.

  1. When using the procedural API: after the second execution of the same cell no figure is displayed (until the next close() call).
  2. When using the OO API: after each execution, the old fig and ax objects are overwritten, a new figure is created and the RAM is filled with invisible figures. Even plt.close('all') does not free any RAM.

Re-executing a cell to tweak or add elements to a plot is a very common use case during interactive sessions.

This issue was first mentioned in #4456.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0