forked from Cryostat-GUI/Cryostat-GUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWindow_plotting.py
39 lines (25 loc) · 933 Bytes
/
Window_plotting.py
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
30
31
32
33
34
35
36
37
38
39
from PyQt5 import QtWidgets
# from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
# from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar
# from matplotlib.figure import Figure
from util import Window_plotting
if __name__ == '__main__':
import numpy as np
# import random
import sys
start_time = 0
stop_time = 60*2
num = stop_time-start_time+1
start_temp = 1
stop_temp = 3
time = np.linspace(start_time, stop_time, num)
temps = np.linspace(start_temp, stop_temp, num)
data = np.column_stack((time, temps)).transpose()
app = QtWidgets.QApplication(sys.argv)
info = dict(data=data, # [random.random() for i in range(10)],
title='random data',
label_x='x-axis',
label_y='y-axis')
main = Window_plotting(**info)
main.show()
sys.exit(app.exec_())