# -*- coding: utf-8 -*- """ Created on Thu Mar 14 08:52:13 2019 @author: lucia """ import string import csv import numpy as np import matplotlib.pyplot as plt with open('Trace 0.csv', newline='') as csvfile: spamreader = csv.reader(csvfile, delimiter=';', quotechar='|') count=1 comienzo=0 columna=0 tope='Analog Channels' x=['Sample Number'] y=['Time (s)'] z=['1 (VOLT)'] t=[] ch1=[] for row in spamreader: # print(row) # print(count) if len(row)>0: linea=row[0] if (comienzo==0): if (tope in linea): comienzo=count+1 else: if (count>comienzo+2): t.append(float(row[columna+1].replace(',','.'))) ch1.append(float(row[columna+2].replace(',','.'))) count+=1 plt.plot(t,ch1)