Skip to content

Commit bfd86da

Browse files
committed
chore: use backend=qtagg to let matplotlib autodetect pyside6 if theyre installed
1 parent 075314c commit bfd86da

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/diffpy/srxplanar/selfcalibrate.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
1-
import importlib
21
from functools import partial
32

43
import numpy as np
5-
from matplotlib import rcParams
64
from scipy.optimize import leastsq, minimize
75

8-
rcParams["backend"] = "Qt4Agg"
96
try:
10-
importlib.import_module("PySide")
7+
from matplotlib import rcParams
118

12-
rcParams["backend.qt4"] = "PySide"
9+
rcParams["backend"] = "QtAgg"
1310
import matplotlib.pyplot as plt
1411

1512
mplenabled = True
1613
except ImportError:
17-
try:
18-
import matplotlib.pyplot as plt
19-
20-
mplenabled = True
21-
except ImportError:
22-
mplenabled = False
14+
mplenabled = False
2315

2416

2517
def halfcut(

0 commit comments

Comments
 (0)