-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot_graphs.py
98 lines (77 loc) · 3.02 KB
/
plot_graphs.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
from matplotlib import pyplot as plt
# NI_R
# values_R = [20, 30, 40, 50, 60, 70]
# d1 = [21.09, 60.84, 86.52, 95.9, 99.6, 100]
# d2 = [56.61, 92.44, 98.39, 99.78, 100, 100]
# d3 = [79.11, 97.78, 99.81, 100, 100, 100]
# NI_f
# values_f = [10, 20, 30, 40, 50, 60, 70]
# d1 = [60.84, 92.44, 97.78, 99.26, 99.73, 100, 100]
# d2 = [86.52, 98.39, 99.81, 99.93, 99.91, 99.89, 99.85]
# d3 = [95.9, 99.78, 100, 100, 100, 100, 100]
# NI_r
# values_r = [30, 40, 50, 60, 70]
# d1 = [4.79, 7.27, 9.79, 14.35, 23.2]
# d2 = [14.76, 20.31, 26.67, 46.37, 64.27]
# d3 = [28.76, 45.49, 54.44, 91.05, 137.73]
# NI_rrc
# values_rrc = [10, 20, 30, 40, 50]
# d1 = [9.13, 17.04, 24.79, 36.5, 48]
# d2 = [16.21, 28.29, 41.2, 62.25, 75.66]
# d3 = [19.21, 35.12, 51.84, 71.25, 88.54]
# NI_fa
# values_fa = [10, 20, 30, 40, 50, 60, 70]
# d1 = [0.71, 1.04, 1.19, 1.09, 1.23, 1.3, 1.29]
# d2 = [1.1, 1.61, 1.42, 1.55, 1.59, 1.73, 1.61]
# d3 = [1.61, 1.82, 2.0, 1.65, 1.69, 1.89, 1.62]
# I1_r
# values_r = [30, 40, 50, 60, 70]
# d1 = [3.21, 4.21, 3.55, 4.15, 4.08]
# d2 = [13.6, 18.35, 12.97, 10.36, 10.98]
# d3 = [30.08, 22.47, 17.3, 18.41, 15.8]
# I1_rrc
# values_rrc = [10, 20, 30, 40, 50]
# d1 = [7.31, 12.94, 17.9, 40.04, 44.5]
# d2 = [9.31, 10.82, 15.19, 32.6, 33.48]
# d3 = [7.33, 12.19, 28.74, 29.77, 23.81]
# I1_f
# values_fa = [10, 20, 30, 40, 50, 60, 70]
# d1 = [3.58, 4.57, 5.9, 3.47, 3.6, 3.62, 2.87]
# d2 = [4.23, 3.89, 2.99, 2.94, 3.46, 2.21, 1.76]
# d3 = [4.02, 3.54, 2.99, 2.87, 2.4, 2.74, 2.41]
# I2_r
# values_r = [30, 40, 50, 60, 70]
# d1 = [5.59, 7.68, 8.67, 14.59, 22.45]
# d2 = [16.39, 23.06, 27.79, 46, 70.01]
# d3 = [32.43, 47.08, 51.72, 90.53, 137.1]
# I2_rrc
# values_rrc = [10, 20, 30, 40, 50]
# d1 = [14.37, 21.34, 30.85, 39.39, 55.85]
# d2 = [14.05, 27.9, 47.16, 55.35, 80.68]
# d3 = [17.51, 37.01, 57.84, 71.7, 87.86]
# I2_f
# values_fa = [10, 20, 30, 40, 50, 60, 70]
# d1 = [4.61, 6.21, 5.66, 5.17, 5.62, 5.95, 6.38]
# d2 = [7.66, 7.37, 7.85, 7.52, 7.58, 8.07, 8.15]
# d3 = [8.67, 9.09, 9.28, 9.56, 9.51, 9.8, 8.63]
def plot_graphs(values_x, data1, data2, data3, label):
plt.title(f'Итеративен алгоритам 2, грешки при локализирање')
plt.xlabel('радио опсег')
plt.ylabel('грешки при локализирање')
plt.plot(values_x, data1, color='red', label='r = 5', marker='o')
plt.plot(values_x, data2, color='blue', label='r = 15', marker='o')
plt.plot(values_x, data3, color='green', label='r = 30', marker='o')
plt.legend(loc='best')
plt.savefig(f'plots/{label}.png')
plt.show()
# plot_graphs(values_R, d1, d2, d3, "NI_R")
# plot_graphs(values_f, d1, d2, d3, "NI_f")
# plot_graphs(values_r, d1, d2, d3, "NI_r")
# plot_graphs(values_rrc, d1, d2, d3, "NI_rrc")
# plot_graphs(values_fa, d1, d2, d3, "NI_fa")
# plot_graphs(values_r, d1, d2, d3, "I_r")
# plot_graphs(values_rrc, d1, d2, d3, "I_rrc")
# plot_graphs(values_fa, d1, d2, d3, "I_fa")
# plot_graphs(values_r, d1, d2, d3, "I2_r")
# plot_graphs(values_rrc, d1, d2, d3, "I2_rrc")
# plot_graphs(values_fa, d1, d2, d3, "I2_fa")