-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path6bar.py
73 lines (57 loc) · 2.49 KB
/
6bar.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
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import numpy as np
import pandas as pd
x = '6bar'
df = pd.read_excel(r'C:\Users\alexa\Documents\Sensor\Files\mbt.xlsx', sheet_name=x, usecols='A:H')
#zm = df['zm']
#z = df['z']
#t = df['t']
z1 = df['z1']*[-1]
t1 = df['t1']
z2 = df['z2']*[-1]
t2 = df['t2']
z3 = df['z3']*[-1]
t3 = df['t3']
fig, (ax1, ax2, ax3) = plt.subplots(ncols=3)
ax1.plot(t1, z1, marker='.', color='red')
plt.xticks(np.arange(start=66, stop=72.5, step=0.5))
ax1.set_title("6 Bar test #1", font="Times New Roman", fontsize=20)
ax1.set_xlabel("t (s)", font="Times New Roman", fontsize=16)
ax1.set_ylabel("h (m)", font="Times New Roman", fontsize=16)
ax1.text(67.7, 10.8, r'h$_{max}$ = 10,86 m', font='Times New Roman', fontsize=15, math_fontfamily='cm')
# x_tail = 68.4
# y_tail = 10.9
# x_head = 69.45
# y_head = 11
# arrow = mpatches.FancyArrowPatch((x_tail, y_tail), (x_head, y_head), mutation_scale=24, color='red')
# ax1.add_patch(arrow)
# ax1.annotate('Top', (68, 10.8), font="Times New Roman", fontsize=14, color='red')
ax2.plot(t2, z2, marker='.')
plt.xticks(np.arange(start=84, stop=87.5, step=0.5))
ax2.set_title("6 Bar test #2", font="Times New Roman", fontsize=20)
ax2.set_xlabel("t (s)", font="Times New Roman", fontsize=16)
ax2.set_ylabel("h (m)", font="Times New Roman", fontsize=16)
ax2.text(84.4, 7.7, r'h$_{max}$ = 7,8 m', font='Times New Roman', fontsize=15, math_fontfamily='cm')
# x_tail = 84.85
# y_tail = 7.8
# x_head = 85.8
# y_head = 7.9
# arrow = mpatches.FancyArrowPatch((x_tail, y_tail), (x_head, y_head), mutation_scale=28)
# ax2.add_patch(arrow)
# ax2.annotate('Top', (84.6, 7.75), font="Times New Roman", fontsize=14, color='blue')
ax3.plot(t3, z3, marker='.', color='orange')
plt.xticks(np.arange(start=164, stop=168, step=0.5))
ax3.set_title("6 Bar test #3", font="Times New Roman", fontsize=20)
ax3.set_xlabel("t (s)", font="Times New Roman", fontsize=16)
ax3.set_ylabel("h (m)", font="Times New Roman", fontsize=16)
ax3.text(164.4, 8.3, r'h$_{max}$ = 8,32 m', font='Times New Roman', fontsize=15, math_fontfamily='cm')
# x_tail = 164.85
# y_tail = 8.3
# x_head = 166
# y_head = 8.35
# arrow = mpatches.FancyArrowPatch((x_tail, y_tail), (x_head, y_head), mutation_scale=23, color='orange')
# ax3.add_patch(arrow)
# ax3.annotate('Top', (164.5, 8.2), font="Times New Roman", fontsize=14, color='orange')
#plt.savefig(f'C:/Users/alexa/Documents/Sensor/media/az-tests\{x}.png')
plt.show()