forked from constantinosskitsas/Framework_GraphAlignment
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotting.py
More file actions
38 lines (30 loc) · 996 Bytes
/
plotting.py
File metadata and controls
38 lines (30 loc) · 996 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
30
31
32
33
34
35
36
37
38
import numpy as np
import matplotlib.pyplot as plt
if __name__ == "__main__":
''' sar -g 1 -1 > load.txt '''
vals = np.loadtxt("D:/Thesis/load.txt", skiprows=3,
usecols=(2, 4, 5, 6))[:-1].T
labels = ('runq-sz', 'avg-1', 'avg-5', 'avg-15')
ylabel = "Load"
''' sar -r 1 -1 > memory.txt '''
# vals = np.loadtxt("D:/Thesis/memory.txt",
# skiprows=3, usecols=(3, 4))[:-1].T
# labels = ('available', 'used')
# ylabel = "Memory[kb]"
plt.figure()
for i, val in enumerate(vals):
print(val)
plt.plot(np.arange(val.size), val, label=labels[i])
# plt.plot(val, np.arange(val.size))
plt.xlabel('Time[s]')
plt.ylabel(ylabel)
# plt.xticks(dim3)
# if plot_type == 1:
# plt.ylabel("Accuracy")
# plt.ylim([-0.1, 1.1])
# else:
# plt.ylabel("Time[s]")
# plt.yscale('log')
plt.legend()
plt.show()
# plt.savefig(f"{filename}_{dim1[i1]}.png")