-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplotpa.py
30 lines (24 loc) · 855 Bytes
/
plotpa.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
import pandas as pd
import matplotlib.pyplot as plt
import os
# path = "E:\\python_programs\\xlsfileprocess\\dataproblem\\new_data7sep24\\processdata\\"
# path = "E:\\Protein-AFM-Analysis-and-Lennard-Jones-potential-fitting\\data\\processdata\\"
path = r"E:\Protein-AFM-Analysis-and-Lennard-Jones-potential-fitting\data\processdata"
listfiles = os.listdir(path)
print(listfiles)
# plt.figure
count = 0
for file in listfiles:
if file.endswith('.dat'):
print(file)
count = count +1
filename = os.path.join(path,file)
# df = pd.read_csv(path+file,delimiter=' ')
df = pd.read_csv(filename,delimiter=' ')
print(df.head())
# plt.figure()
plt.plot(df['piezo'],df['amplitude'])
plt.show()
# if count ==1:
# break
# plt.legend()