-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFG_Plot.py
More file actions
49 lines (32 loc) · 1.41 KB
/
Copy pathFG_Plot.py
File metadata and controls
49 lines (32 loc) · 1.41 KB
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
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import rcParams
rcParams['font.family'] = 'Times New Roman'
df = pd.read_csv('E:\PYTHON_WORKSPACE\Vulnerability-Assessment-of-an-existing-Pre-Code-Building-in-Nepal-main\Building_Bare_Kabin/Combined.csv')
pga = df["PGA (g)"]
columns = {
"IO Bare": "PoE (IO Bare)",
"IO Steel": "PoE (IO Steel Angle)",
"LS Bare": "PoE (LS Bare)",
"LS Steel": "PoE (LS Steel Angle)",
"CP Bare": "PoE (CP Bare)",
"CP Steel": "PoE (CP Steel Angle)",
}
plt.figure(figsize=(10, 7))
plt.plot(pga, df[columns["IO Bare"]], color="tab:blue", linewidth=1.75, label="Bare")
plt.plot(pga, df[columns["IO Steel"]], color="tab:orange", linewidth=1.75, label="Steel Angle")
plt.plot(pga, df[columns["LS Bare"]], color="tab:blue", linewidth=1.75)
plt.plot(pga, df[columns["LS Steel"]], color="tab:orange", linewidth=1.75)
plt.plot(pga, df[columns["CP Bare"]], color="tab:blue", linewidth=1.75)
plt.plot(pga, df[columns["CP Steel"]], color="tab:orange", linewidth=1.75)
plt.xlabel("PGA (g)", fontsize=15)
plt.ylabel("Probability of Exceedance", fontsize=15)
plt.tick_params(direction='in', right=True, labelsize=15)
plt.axvline(0.35, color='tab:red', linestyle='--', linewidth=1.5)
plt.title("Fragility Curves", fontsize=15)
plt.xlim(0, 2)
plt.ylim(0, 1)
plt.grid(True, linewidth=0.7, alpha=0.7)
plt.legend(fontsize=15)
plt.tight_layout()
plt.show()