Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2a41be commit faeebe6Copy full SHA for faeebe6
1 file changed
lib/matplotlib/sphinxext/plot_directive.py
@@ -146,24 +146,17 @@
146
import sys
147
import textwrap
148
import traceback
149
-import warnings
150
151
from docutils.parsers.rst import directives, Directive
152
from docutils.parsers.rst.directives.images import Image
153
import jinja2 # Sphinx dependency.
154
155
import matplotlib
156
from matplotlib.backend_bases import FigureManagerBase
157
-try:
158
- with warnings.catch_warnings(record=True):
159
- warnings.simplefilter("error", UserWarning)
160
- matplotlib.use('Agg')
161
-except UserWarning:
162
- import matplotlib.pyplot as plt
163
- plt.switch_backend("Agg")
164
-else:
165
+import matplotlib.pyplot as plt
166
from matplotlib import _pylab_helpers, cbook
+
+matplotlib.use("agg")
167
align = Image.align
168
169
__version__ = 2
0 commit comments