-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmplwidget.py
More file actions
30 lines (21 loc) · 911 Bytes
/
mplwidget.py
File metadata and controls
30 lines (21 loc) · 911 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from PyQt5.QtWidgets import*
from matplotlib.backends.backend_qt5agg import FigureCanvas
from matplotlib.figure import Figure
from matplotlib import style
#https://www.youtube.com/watch?v=2C5VnE9wPhk&t=355s
class MplWidget(QWidget):
def __init__(self, parent = None):
'''
Set up the graphing area
This class is used to define the class of the plot area in feGraph.py
In the FE_G.ui file, there is an attribute called graphWidget that has been
promoted to this class
'''
#style.use('seaborn-deep') #seaborn-deep
QWidget.__init__(self, parent)
self.fig = Figure()
self.canvas = FigureCanvas(self.fig)
vertical_layout = QVBoxLayout()
vertical_layout.addWidget(self.canvas)
self.canvas.axes = self.canvas.figure.add_subplot(111)
self.setLayout(vertical_layout)