Skip to content

Closing figures does not work #427

Open
@lfriedri

Description

@lfriedri

How to reproduce

%matplotlib widget

import matplotlib.pyplot as plt
import numpy as np

fig = plt.figure(1)
plt.plot(np.sin(np.linspace(0, 20, 100)))

and then

plt.close(1)

Expected behaviour

Plotting canvas disappears.

Actual behaviour

Figure becomes non-interactive (tools do not work anymore), but canvas is still visible.

Versions

sys.version: 3.8.6 (tags/v3.8.6:db45529, Sep 23 2020, 15:52:53) [MSC v.1927 64 bit (AMD64)]
ipympl version: 0.8.7
Jupyter notebook running locally in a VS code (version 1.63.2), jupyter extension v2021.11.1001550889

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