-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpushover_plots.py
More file actions
29 lines (25 loc) · 928 Bytes
/
Copy pathpushover_plots.py
File metadata and controls
29 lines (25 loc) · 928 Bytes
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
import os
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib import rcParams
rcParams['font.family'] = 'Times New Roman'
# List of files
files = [
"E:\PYTHON_WORKSPACE\Vulnerability-Assessment-of-an-existing-Pre-Code-Building-in-Nepal-main\Building_Bare_Kabin\pushover_results.csv",
"E:\PYTHON_WORKSPACE\Vulnerability-Assessment-of-an-existing-Pre-Code-Building-in-Nepal-main\Building_Bare_Kabin\pushover_results_steel_jacketing.csv"
]
plt.figure()
for file in files:
df = pd.read_csv(file)
# Remove .csv extension for the label
label = os.path.basename(file).replace(".csv", "").replace(" Pushover", "")
plt.plot(df["Drift (%)"], df["Base Shear (kN)"], label=label)
plt.xlabel("Drift (%)")
plt.ylabel("Base Shear (kN)")
plt.title("Pushover Curves")
plt.legend(loc='lower right')
plt.xlim(0, 4)
plt.ylim(0, 1000)
plt.grid(True, linewidth=0.7, alpha=0.6)
plt.tight_layout()
plt.show()