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

Merge branch '470-matplotlib-deprecation-warning' into 'master'

Resolve "Matplotlib deprecation warning"

Closes #470

See merge request !760
parents 0140d1e7 c9bd9a43
No related branches found
No related tags found
1 merge request!760Resolve "Matplotlib deprecation warning"
Pipeline #120824 passed with warnings
......@@ -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