Skip to content

Commit f00b7c7

Browse files
authored
MAINT: close the figures before backend change (#145)
MPL 3.8 issues a DeprecationWarning, follow its suggestion
1 parent 1dd6ff4 commit f00b7c7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scpdt/util.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ def matplotlib_make_nongui():
1717
"""
1818
try:
1919
import matplotlib
20+
import matplotlib.pyplot as plt
2021
backend = matplotlib.get_backend()
22+
plt.close('all')
2123
matplotlib.use('Agg')
2224
except ImportError:
2325
backend = None

0 commit comments

Comments
 (0)