Skip to content

Commit f025c9a

Browse files
committed
BUG: fix the MPL filter for MPL 3.8.4
In that MPL version (numpy 2.0 compatible?), the text of the user warning has changed into UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown
1 parent 5d77c74 commit f025c9a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scpdt/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ def matplotlib_make_nongui():
2727
try:
2828
# Matplotlib issues UserWarnings on plt.show() with a non-GUI backend,
2929
# Filter them out.
30+
# UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown
3031
with warnings.catch_warnings():
31-
warnings.filterwarnings("ignore", "Matplotlib", UserWarning)
32+
warnings.filterwarnings("ignore", "FigureCanvasAgg", UserWarning)
3233
yield backend
3334
finally:
3435
if backend:

0 commit comments

Comments
 (0)