File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 16
16
# Do this first before any other matplotlib imports, to force matplotlib to
17
17
# use a Qt backend
18
18
from matplotlib .backends .qt_compat import QtWidgets , QtCore , QtGui , _getSaveFileName
19
- from matplotlib .backends .backend_qt4agg import FigureCanvasQTAgg as FigureCanvas4
20
- from matplotlib .backends .backend_qt5agg import FigureCanvasQTAgg as FigureCanvas5
21
19
22
- def FigureCanvas (fig ):
23
- try :
24
- return FigureCanvas5 (fig )
25
- except Exception :
26
- return FigureCanvas4 (fig )
20
+ try :
21
+ from matplotlib .backends .backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
22
+ except Exception :
23
+ from matplotlib .backends .backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
27
24
28
25
import matplotlib
29
26
import matplotlib .pyplot as plt
You can’t perform that action at this time.
0 commit comments