-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot_impedance.py
92 lines (63 loc) · 3.58 KB
/
plot_impedance.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
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.pyplot import figure
labels_medium = ["L1 (m)", "L2 (m)", "L3 (m)", "L4 (m)", "L5 (m)", "L6 (m)", "L15 (m)", "L16 (m)"]
color = ["tab:blue", "tab:orange", "tab:green", "tab:red", "tab:cyan", "tab:purple", "tab:brown", "tab:pink"]
color = color + color
labels_short = ["L1 (s)", "L2 (s)", "L3 (s)", "L4 (s)", "L5 (s)", "L6 (s)", "L15 (s)", "L16 (s)"]
labels = labels_medium + labels_short
#colors = np.random.shuffle(color).tolist()
figure(figsize=(8, 6))
x = np.array([0,1,2,5,7,10,12,15,18,20])
y = np.array(
[
#################### MEDIUM HAIR LENGTH #######################
[601, 445, 414, 349, 327, 309, 295, 288, 292, 295], # L1 (medium)
[1136, 715, 760, 501, 442, 407, 373, 359, 354, 350], # L2 (medium)
[664, 459, 422, 335, 312, 289, 273, 268, 274, 281], # L3 (medium)
[3393, 639, 508, 336, 310, 202, 182, 179, 177, 175], # L4 (medium)
[4674, 792, 490, 234, 203, 675, 518, 488, 473, 459], # L5 (medium)
[4931, 2354, 1480, 573, 472, 1343, 860, 768, 732, 713], # L6 (medium)
#[2644, 3617, 4014, 4863, 4945, 4994, 4999, 4986, 5021, 5004], # L7 (medium)
#[2767, 4218, 4300, 2497, 2399, 4272, 3505, 3417, 3483, 3480], # L8 (medium)
#[3161, 4306, 4800, 4869, 4892, 4893, 4906, 4891, 4927, 4906], # L9 (medium)
#[4867, 4882, 4897, 4928, 4899, 4917, 4906, 4908, 4986, 4923] # L10 (medium)
#[4797, 4776, 4744, 4766, 4789, 4816, 4842, 4837, 4853, 4819] # L11 (medium)
#[4634, 4800, 4796, 4760, 4763, 4773, 4799, 4806, 4781, 4755] # L12 (medium)
#[4067, 4566, 4561, 4604, 4641, 4669, 4712, 4729, 4680, 4627] # L13 (medium)
[403, 178, 165, 133, 120, 113, 95, 97, 123, 146], # L15 (medium)
[574, 423, 398, 329, 309, 290, 274, 267, 269, 273], # L16 (medium)
###############################################################
#################### SHORT HAIR LENGTH #######################
[1049, 861, 700, 470, 382, 349, 334, 323, 309, 289], # L1 (short)
[4873, 4401, 3710, 3422, 1511, 1550, 1413, 986, 995, 422], # L2 (short)
[4376, 2556, 1505, 1015, 739, 654, 562, 499, 468, 361], # L3 (short)
[766, 663, 511, 449, 408, 350, 332, 316, 299, 288], # L4 (short)
[1183, 877, 738, 635, 567, 451, 427, 404, 388, 378], # L5 (short)
[1398, 1119, 1090, 923, 829, 656, 623, 586, 556, 537], # L6 (short)
#[5066, 5091, 5079, 5065, 5098, 5083, 5085, 5082, 5070, 5084], # L7 (short)
#[4635, 4931, 5020, 4965, 4934, 4233, 4101, 3984, 3865, 3811], # L8 (short)
#[4452, 3951, 4063, 3752, 3628, 2911, 2695, 2474, 2319, 2244], # L9 (short)
#[4908, 4880, 4847, 4830, 4830, 4797, 4772, 4750, 4718, 4601], # L10 (short)
#[4869, 4904, 4889, 4828, 4490, 4162, 3970, 3418, 3158, 3153], # L11 (short)
#[4852, 4855, 4817, 4719, 4266, 3855, 3625, 3277, 3038, 3024], # L12 (short)
#[4852, 4944, 4942, 4933, 4874, 4679, 4541, 4089, 3784, 3934], # L13 (short)
[1017, 568, 493, 365, 312, 285, 271, 257, 245, 275], # L15 (short)
[660, 489, 378, 327, 329, 304, 291, 282, 271, 271] # L16 (short)
###############################################################
]
)
plt.title("Impedance Changes over Time")
plt.xlabel("Time (min)")
plt.ylabel("Impedance (k" + '\u03A9' + ")")
for i, array in enumerate(y):
plt.plot(
x,
array,
color = color[i],
marker="o",
label=labels[i],
)
plt.legend(loc="center left", bbox_to_anchor=(0.81, 0.625))
plt.show()
#plt.savefig("impedance_plot.pdf")