Skip to content

nbagg close figure when removed from dom #4841

Closed
@tacaswell

Description

@tacaswell

Register a call back on the DOM element that contains the figure so that when it is removed from the DOM it closes the figure (which if it is the last view of the figure open removes it from Gcf and starts the clean up process).

This addresses the case where users have

fig, ax = plt.subplots()
...

in a cell they keep re-executing.

attn @pelson

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions