-
Notifications
You must be signed in to change notification settings - Fork 0
/
graph.py
87 lines (81 loc) · 3.4 KB
/
graph.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
import matplotlib.pyplot as plt
import numpy as np # If you need to generate sample data
# Replace the partial values with complete data
time = list(range(1, 366))
dst = [
-16, -15, -12, -9, -12, -19, -16, -19, -18, -16,
-12, -6, -1, 0, 3, 5, 3, -4, -18, -12,
-16, -17, -14, -10, -14, -8, -8, -3, -3, -17,
-10, -8, 0, -11, -22, -22, -24, -18, -18, -16,
-15, -4, -3, -8, -8, 2, -1, 5, 2, 1,
-15, -16, -13, -11, 1, -9, -1, -13, -11, -3,
-3, -12, -16, -37, -30, -26, -20, -24, -22, -16,
-21, -19, -14, -18, -3, -5, 3, -7, -1, 1,
3, 1, -1, 8, -18, -13, -3, -5, 1, -34,
-36, -32, -27, -31, -20, -13, -5, -20, 0, -7,
-4, -7, -14, 8, -1, -3, 2, -15, -6, 0,
4, 15, -3, -23, -10, -37, -36, -33, -25, -19,
-18, -15, -11, -3, 4, 7, 7, 11, 6, 14,
2, 3, 9, 11, 16, 10, 13, 20, 16, 3,
2, -4, 1, 8, 1, -9, -3, -4, -4, 1,
-3, -1, -9, -16, -10, -9, -4, 3, 3, -27,
-47, -34, -24, 0, -21, -15, -23, -14, -12, -15,
-17, -11, -15, -7, -3, 10, 7, 10, -2, -14,
-8, -6, 1, 2, 7, 8, 5, -1, -1, 11,
-1, 6, 7, -9, -14, -18, -21, -8, -15, -34,
-15, -4, 2, 1, -19, -4, 4, 8, 5, 13,
-87, -46, -24, -9, 0, -11, -4, -14, -17, -7,
-9, -0, -2, 2, 2, 7, 17, 11, 23, -3,
-38, -14, -10, -23, -16, -13, -7, -4, -11, -4,
-0, 3, 9, -18, -31, -31, -31, -33, -18, -16,
-9, -13, -10, 2, -6, 3, -2, -14, -22, -12,
-10, -5, -3, 2, 9, 4, -12, -5, -1, 4,
-21, -56, -40, -29, -21, -11, -16, -14, -15, -8,
-8, 1, 8, -24, -18, -12, -11, -14, -2, 11,
-5, 4, -2, -4, 0, -4, -5, -27, -23, -15,
-10, -5, -1, -1, -1, -13, -8, -4, 4, 5,
-7, -15, -8, -6, -4, 4, 3, 2, -10, -11,
-4, -4, 1, 2, 7]
ae = [
242, 184, 174, 178, 285, 266, 252, 273, 171, 164,
105, 50, 62, 54, 90, 42, 56, 299, 232, 133,
436, 432, 344, 337, 346, 384, 304, 218, 316, 255,
136, 198, 36, 78, 104, 90, 52, 38, 53, 53,
341, 448, 168, 72, 60, 42, 512, 423, 367, 426,
456, 335, 147, 102, 266, 86, 149, 166, 299, 374,
41, 213, 130, 91, 445, 135, 83, 69, 80, 122,
96, 184, 43, 98, 140, 150, 235, 194, 275, 526,
267, 310, 197, 127, 67, 76, 168, 617, 192, 100,
55, 79, 102, 176, 53, 75, 94, 85, 63, 76,
64, 202, 111, 140, 81, 52, 357, 277, 275, 148,
58, 152, 142, 96, 241, 231, 190, 108, 99, 100,
82, 220, 217, 102, 100, 56, 160, 110, 69, 348,
148, 184, 99, 93, 70, 78, 590, 472, 168, 66,
110, 246, 248, 370, 261, 294, 252, 135, 171, 112,
80, 70, 122, 96, 184, 347, 376, 264, 122, 81,
104, 95, 115, 148, 107, 62, 144, 381, 372, 493,
440, 216, 400, 565, 287, 120, 77, 244, 107, 128,
373, 381, 194, 350, 195, 145, 366, 677, 115, 108,
293, 299, 221, 324, 547, 491, 347, 387, 190, 216,
163, 158, 117, 116, 68, 40, 384, 571, 284, 304,
221, 148, 140, 100, 92, 169, 57, 40, 35, 53,
413, 431, 533, 483, 482, 123, 110, 115, 271, 193,
153, 81, 70, 248, 319, 392, 67, 101, 56, 44,
51, 62, 103, 150, 46, 25, 24, 390, 635, 361,
365, 125, 99, 289, 233, 218, 112, 139, 52, 98,
399, 224, 176, 183, 80, 47, 51, 111, 82, 149,
107, 62, 35, 222, 460, 238, 166, 91, 64, 74,
192, 254, 130, 63, 52, 55, 346, 242, 106, 109,
70, 36, 86, 184, 206, 192, 151, 81, 58, 84,
72]
# Plotting the data
plt.plot(time, dst, label='DST')
plt.plot(time, ae, label='AE')
# Adding labels and title
plt.xlabel('Time Intervals')
plt.ylabel('Values')
plt.title('DST and AE During Disturbed Periods')
# Adding legend
plt.legend()
# Display the plot
plt.show()