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.
2 parents 1eaf40f + faeebe6 commit 512aecbCopy full SHA for 512aecb
1 file changed
lib/matplotlib/sphinxext/plot_directive.py
@@ -141,24 +141,17 @@
141
import sys
142
import textwrap
143
import traceback
144
-import warnings
145
146
from docutils.parsers.rst import directives, Directive
147
from docutils.parsers.rst.directives.images import Image
148
import jinja2 # Sphinx dependency.
149
150
import matplotlib
151
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
161
from matplotlib import _pylab_helpers, cbook
+
+matplotlib.use("agg")
162
align = Image.align
163
164
__version__ = 2
0 commit comments