Skip to content
Snippets Groups Projects
Commit c9bd9a43 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Fix deprecation warning

parent 0140d1e7
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment