Skip to content

[Bug]: Showing figures from multiple python-instances causes blank figures #31066

Closed as not planned

Description

@vegardjervell

Bug summary

First of all, I've tested this with a range of matplotlib versions, and triggered the same behaviour repeatedly. Due to that, I don't think this is really an issue with matplotlib, but rather some other library being used in relation to the backend. Regardless, I don't really know where else I would post to try to find the underlying problem to find a fix.

Basically, using super-simple script:

# mre.py
import matplotlib.pyplot as plt
plt.plot([1, 2, 3], [1, 2, 3])
plt.show()

if I run this multiple times without closing the plot in-between (not using IPython or anything, just executing directly as python mre.py from three different terminal windows), I consistently get a blank figure on the third (and all subsequent) execution(s).

Code for reproduction

# mre.py
import matplotlib.pyplot as plt
plt.plot([1, 2, 3], [1, 2, 3])
plt.show()

# Run with three or more independent instances without closing the shown window.

Actual outcome

Blank figure on the third (and subsequent) execution(s):

Image

Expected outcome

Should simply get the plot several times (as I have for many years).

Additional information

pip list

Package           Version 
----------------- ----------- 
contourpy         1.3.3
cycler            0.12.1
et_xmlfile        2.0.0
flexcache         0.3
flexparser        0.4
fonttools         4.59.2
kiwisolver        1.4.9
matplotlib        3.10.8
numpy             2.3.0
openpyxl          3.1.5
packaging         25.0
pandas            2.3.2
pillow            11.3.0
Pint              0.25.2
pip               25.2
platformdirs      4.5.0
pyparsing         3.2.3
python-dateutil   2.9.0.post0
pytz              2025.2
scipy             1.16.1
six               1.17.0
typing_extensions 4.15.0
tzdata            2025.2

Operating system

macOS 15.6

Matplotlib Version

3.10.8

Matplotlib Backend

macosx

Python version

3.12.4

Jupyter version

No response

Installation

pip

Activity

  1. jklymak commented on Feb 3, 2026

    @jklymak
    Member

    I cannot reproduce this on my Mac. I was able to open at least 5 different windows from five different prompts. Hard to know what broke on your install, but I would try a fresh environment.

  2. vegardjervell commented on Feb 4, 2026

    @vegardjervell
    Author

    I have no idea what was going on, but today this works as expected again. Haven't reinstalled anything, still using the same venv, haven't even restarted my machine. Smells like something wonky going on with my machine more than anything else. Sorry for the trouble, I'll just close this since even I can't reproduce it anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions