Skip to content

Commit 86a5208

Browse files
committed
Fix matplotlib agg messages
1 parent 730abf1 commit 86a5208

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

doc/conf.py

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# -*- coding: utf-8 -*-
22
import sys
33
import os
4+
import warnings
45

56
extensions = [
67
'sphinx.ext.autodoc',
@@ -80,3 +81,9 @@
8081
def setup(app):
8182
app.add_javascript('js/copybutton.js')
8283
app.add_stylesheet("basic.css")
84+
85+
86+
# Remove matplotlib agg warnings from generated doc when using plt.show
87+
warnings.filterwarnings("ignore", category=UserWarning,
88+
message='Matplotlib is currently using agg, which is a'
89+
' non-GUI backend, so cannot show the figure.')

0 commit comments

Comments
 (0)