Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Stuck figure window after plt.close() in ipython with Qt5 #17109

Copy link
Copy link
Open
@felixchenier

Description

@felixchenier
Issue body actions

Bug report

Bug summary

When more than one figure is shown, then clicking on the last figure's close button or running plt.close() or plt.close('all') leaves a zombie figure behind. At first, figure windows are properly closed, but when switching back to the matplotlib python application, the last figure resuscitates and is not clickable nor closable anymore.

Doing the samething another time leaves an additional zombie figure window, and so on. The only way to close those non-responding windows is to quit ipython.

Code for reproduction

Running in ipython:

%matplotlib Qt5
import matplotlib.pyplot as plt
plt.figure()
plt.figure()
plt.close('all')

Actual outcome

No output, and the figures close. But then if we press alt-tab, the last figure resuscitates and does not respond to user input.

Expected outcome

The last figure should not resuscitate.

Matplotlib version

  • Operating system: macOS 10.15.4
  • Matplotlib version: 3.1.3
  • Matplotlib backend (Qt5Agg):
  • Python version: 3.7.7
  • Other libraries:

Installation under conda, default conda channel:

conda create -n test python=3.7
conda activate test
conda install ipython matplotlib pyqt

[TAC edited to remove comments in example code to make copy-pasting easier]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.