File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 141
141
import sys
142
142
import textwrap
143
143
import traceback
144
- import warnings
145
144
146
145
from docutils .parsers .rst import directives , Directive
147
146
from docutils .parsers .rst .directives .images import Image
148
147
import jinja2 # Sphinx dependency.
149
148
150
149
import matplotlib
151
150
from matplotlib .backend_bases import FigureManagerBase
152
- try :
153
- with warnings .catch_warnings (record = True ):
154
- warnings .simplefilter ("error" , UserWarning )
155
- matplotlib .use ('Agg' )
156
- except UserWarning :
157
- import matplotlib .pyplot as plt
158
- plt .switch_backend ("Agg" )
159
- else :
160
- import matplotlib .pyplot as plt
151
+ import matplotlib .pyplot as plt
161
152
from matplotlib import _pylab_helpers , cbook
153
+
154
+ matplotlib .use ("agg" )
162
155
align = Image .align
163
156
164
157
__version__ = 2
You can’t perform that action at this time.
0 commit comments