import os os.chdir(r'D:\Documents(D)\Bellevue\0-PSI\1-Cycle 1 Chaine Multiphysique\3 TP OK\TP2') f=open('essai-20.txt') tab=f.readlines() t=[] m1=[] m2=[] for i in range(36,len(tab)-4): l=tab[i].split("\\'b3") t.append(float(l[2])) m1.append(float(l[3])) m2.append(float(l[4])) import matplotlib.pyplot as pl pl.plot(t,m1,'r',label='consigne') pl.plot(t,m2,'b',label='réponse') pl.legend() pl.show()