Processing Data

With Different delay time and magnetic field

20181212.txt
20181212_30A_delay_1s.txt
20181212_35A.txt
20181212_45A.txt
20181212_45A_delay_1s.txt

In [9]:
import plotly as py
from plotly.graph_objs import Scatter, Layout
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
init_notebook_mode(connected=True)
import numpy as np
import plotly.graph_objs as go
import pandas as pd
In [28]:
path = 'C:\\Users\\KC\\'
file = ['20181212.txt','20181212_30A_delay_1s.txt','20181212_35A.txt','20181212_45A.txt','20181212_45A_delay_1s.txt']
filename = []
for i in file:
    filename.append(path+i)
data = []
for i in filename:
    data.append(pd.read_csv(i,sep='\t'))
In [50]:
trace = []
for i in range(5):
    locals()['trace%s' % (i)]=go.Scatter(x=data[i]['Cuurent\s(A)'].values, y=data[i]['Field\s(G)'].values, name=file[i][:-4])
    trace.append(locals()['trace%s' % (i)])
iplot(trace, filename='test')
In [ ]: