Commit c9bd9a43 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Fix deprecation warning

parent 0140d1e7
Pipeline #119830 passed with stage
in 4 minutes and 57 seconds
......@@ -15,6 +15,7 @@ from importlib import import_module
import json
import warnings
from distutils.version import StrictVersion
import numpy as np
from scipy.interpolate import interp2d
from scipy.special import logsumexp
......@@ -965,7 +966,10 @@ else:
for backend in non_gui_backends:
try:
logger.debug("Trying backend {}".format(backend))
matplotlib.use(backend, warn=False)
if StrictVersion(matplotlib.__version__) >= StrictVersion("3.1"):
matplotlib.use(backend)
else:
matplotlib.use(backend, warn=False)
plt.switch_backend(backend)
break
except Exception:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment