-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathplot.py
32 lines (26 loc) · 1.17 KB
/
plot.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
import matplotlib.pylab as plt
import numpy as np
import pandas as pd
def do_av(path:str, len:int, points:int):
stack = np.zeros((1,points))
for i in range(len):
_path = path + str(i) + ".csv"
data = np.genfromtxt(_path,delimiter=',')
stack = np.vstack((stack, data))
stack = stack[1::]
return np.mean(stack,axis=0)
LEN = 300
POINTS = 247
"""
plt.plot(do_av(".\\data2\\clean_Al_",LEN,POINTS),marker='o', linestyle='dashed',color="black",label = "no laser")
plt.plot(do_av(".\\data2\\laser_blue_Al_",LEN,POINTS),marker='o', linestyle='dashed',color="blue", label = "blue")
plt.plot(do_av(".\\data2\\laser_Al_",LEN,POINTS),marker='o', linestyle='dashed',color="green", label = "green")
plt.title("graphene_Al")
plt.ylabel("signal [V]")"""
plt.plot(do_av(".\\data4\\clean_Al_",LEN,POINTS),marker='o', linestyle='dashed',color="black",label = "no laser")
plt.plot(do_av(".\\data4\\laser_blue_Al_",LEN,POINTS),marker='o', linestyle='dashed',color="blue", label = "blue")
plt.plot(do_av(".\\data4\\laser_green_Al_",LEN,POINTS),marker='o', linestyle='dashed',color="green", label = "green")
plt.title("graphene")
plt.ylabel("signal [V]")
plt.legend()
plt.show()