-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
65 lines (60 loc) · 5.18 KB
/
test.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
import matplotlib.pyplot as plt
import pandas as pd
# Data from the provided list
data = {
"Sector Load (%) - Before Load Balancing": [
48.62, 50.19, 53.76, 45.46, 24.86, 27.36, 52.58, 73.07, 69.25, 5.84, 28.9, 52.14, 25.38, 78.29, 49.63, 74.08, 75.15,
81.3, 48.87, 77.01, 70.67, 43.67, 36.12, 31.11, 74.66, 22.81, 94.68, 67.86, 55.81, 37.09, 66.03, 28.12, 69.84, 27.35,
34.11, 29.91, 61.68, 89.08, 90.04, 28.3, 57.63, 60.39, 87.42, 74.77, 31.83, 87.45, 69.99, 51.27, 93.54, 81.47, 72.54,
58.34, 47.63, 28.57, 56.95, 69.97, 39.04, 87.98, 92.43, 9.12, 80.82, 54.46, 10.09, 94.67, 15.75, 88.81, 59.59, 14.16,
83.92, 48.76, 44.51, 69.23, 40.8, 77.57, 94.96, 12.35, 76.56, 76.22, 83, 40.5, 61.05, 26.2, 37.39, 65.63, 21.21, 96.31,
8.9, 37.16, 90.06, 43.66, 94.35, 87.36, 76.53, 68.87, 95.25, 6.33, 80.83, 44.17, 92.1, 15.73, 72.29, 61.8, 80.21, 81.35,
60.21, 42.98, 64.03, 57.81, 58.03, 13.03, 18.34, 37.92, 77.12, 34.95, 38.26, 76.1, 51.39, 73.01, 32.04, 47.7, 98.53,
50.27, 36.64, 87.77, 44.23, 72.1, 73.49, 26.19, 51.13, 67.24, 60.94, 82.76, 12.64, 20.46, 9.85, 56.79, 43.85, 34.15,
56.67, 58.01, 89.05, 72.2, 91.67, 8.62, 43.11, 12.37, 23.86, 25.96, 63.25, 70.65, 53.18, 65.34, 14.63, 6.51, 43.28,
89.52, 51.45, 98.05, 53.94, 33.67, 82.54, 96.87, 17.48, 13.22, 98.23, 86.96, 17.13, 12.82, 45.96, 13.39, 43.49, 22.75,
22.23, 77.09, 22.95, 94.4, 14.32, 56.07, 55.47, 35.18, 99.25, 78.23, 53.78, 28.59, 82.51, 37.27, 79.78, 66.61, 61.47,
88.27, 23.73, 88.5, 66.75, 73.31, 42, 13.52, 21.96, 99.38, 14.68, 89.42, 69.82, 76.5, 61.6, 23.35, 50.77, 94.22, 71.59,
47.54, 33.35, 68.42, 35.4, 32.21, 94.81, 79.62, 45.09, 75.66, 14.13, 82.15, 38.2, 94.1, 23.7, 54.06, 66.24, 41.02,
71.17, 69.68, 84.66, 7.82, 13.13, 83.21, 93.04, 37.44, 92.98, 32.07, 30.05, 64.79, 19.72, 89.48, 20.19, 20.53, 61.71,
61.48, 83.46, 67.37, 23.01, 27, 67.25, 89.47, 13.23, 67, 33.36, 47.06, 91.36, 50.89, 11.31, 70.88, 57.58, 85.79, 21.2,
9.08, 34.7, 93.39, 22.98, 62.26, 60.22, 41.63, 85.37, 42.9, 63.36, 46.76, 11.19, 38.7, 86.03, 77.58, 98.71, 8.88, 18.82,
38.17, 96.13, 95.08, 26.69, 7.27, 91.61, 52.54, 54.96, 31.5, 66.48, 57.9, 6.7, 62.14, 55.88, 92.26, 29.7, 69, 78.35,
70.44, 94.48, 89.89, 41.06, 58.78, 44.36
],
"Sector Load (%) - After Load Balancing": [
48.62, 50.19, 53.76, 45.46, 24.86, 27.36, 52.58, 73.07, 69.25, 5.84, 28.9, 52.14, 25.38, 78.29, 49.63, 74.08, 75.15,
45.2, 48.87, 77.01, 70.67, 43.67, 36.12, 31.11, 74.66, 22.81, 60.82, 67.86, 55.81, 37.09, 66.03, 28.12, 69.84, 27.35,
34.11, 29.91, 61.68, 75.24, 66.23, 28.3, 57.63, 60.39, 42.03, 74.77, 31.83, 64.08, 69.99, 51.27, 68.09, 56.328, 72.54,
58.34, 47.63, 28.57, 56.95, 69.97, 39.04, 71.952, 82.632, 9.12, 54.768, 54.46, 10.09, 88.008, 15.75, 73.944, 59.59,
14.16, 62.208, 48.76, 44.51, 69.23, 40.8, 77.57, 64.704, 12.35, 76.56, 76.22, 36, 40.5, 61.05, 26.2, 37.39, 65.63,
21.21, 67.944, 8.9, 37.16, 52.944, 43.66, 63.24, 46.464, 76.53, 68.87, 65.4, 6.33, 30.792, 44.17, 57.84, 15.73, 72.29,
61.8, 29.304, 32.04, 60.21, 42.98, 64.03, 57.81, 58.03, 13.03, 18.34, 37.92, 77.12, 34.95, 38.26, 76.1, 51.39, 73.01,
32.04, 47.7, 73.272, 50.27, 36.64, 47.448, 44.23, 72.1, 73.49, 26.19, 51.13, 67.24, 60.94, 35.424, 12.64, 20.46, 9.85,
56.79, 43.85, 34.15, 56.67, 58.01, 50.52, 72.2, 56.808, 8.62, 43.11, 12.37, 23.86, 25.96, 63.25, 70.65, 53.18, 65.34,
14.63, 6.51, 43.28, 51.648, 51.45, 72.12, 53.94, 33.67, 34.896, 69.288, 17.48, 13.22, 72.552, 45.504, 17.13, 12.82,
45.96, 13.39, 43.49, 22.75, 22.23, 77.09, 22.95, 63.36, 14.32, 56.07, 55.47, 35.18, 75, 78.23, 53.78, 28.59, 34.824,
37.27, 28.272, 66.61, 61.47, 48.648, 23.73, 49.2, 66.75, 73.31, 42, 13.52, 21.96, 75.312, 14.68, 51.408, 69.82, 76.5,
61.6, 23.35, 50.77, 62.928, 71.59, 47.54, 33.35, 68.42, 35.4, 32.21, 64.344, 27.888, 45.09, 75.66, 14.13, 33.96, 38.2,
62.64, 23.7, 54.06, 66.24, 41.02, 71.17, 69.68, 39.984, 7.82, 13.13, 36.504, 60.096, 37.44, 59.952, 32.07, 30.05, 64.79,
19.72, 51.552, 20.19, 20.53, 61.71, 61.48, 37.104, 67.37, 23.01, 27, 67.25, 51.528, 13.23, 67, 33.36, 47.06, 56.064,
50.89, 11.31, 70.88, 57.58, 42.696, 21.2, 9.08, 34.7, 60.936, 22.98, 62.26, 60.22, 41.63, 41.688, 42.9, 63.36, 46.76,
11.19, 38.7, 43.272, 77.58, 73.704, 8.88, 18.82, 38.17, 67.512, 64.992, 26.69, 7.27, 56.664, 52.54, 54.96, 31.5, 66.48,
57.9, 6.7, 62.14, 55.88, 58.224, 29.7, 69, 78.35, 70.44, 63.552, 52.536, 41.06, 58.78, 44.36
]
}
# Creating DataFrame
df = pd.DataFrame(data)
# Plotting
plt.figure(figsize=(10, 6))
plt.plot(df.index, df["Sector Load (%) - Before Load Balancing"], label="Before Load Balancing", color='r', marker='o', linestyle='-', markersize=4)
plt.plot(df.index, df["Sector Load (%) - After Load Balancing"], label="After Load Balancing", color='b', marker='s', linestyle='-', markersize=4)
plt.xlabel('Sector')
plt.ylabel('Load (%)')
plt.title('Sector Load Comparison Before and After Load Balancing')
plt.legend()
plt.grid(True)
plt.tight_layout()
# Save the plot as an image
plt.savefig('/mnt/data/sector_load_comparison.png')
plt.show()