Sie sind auf Seite 1von 1

Archivo: /home/deadpool/Escritorio/Docon matplot/Gra caPy-Matplo.

py
# @autor Daniel Torres Estrada
import matplotlib.pyplot as plt
x=[]
y=[]
dataset = open ('dataset.txt','r')
for line in dataset:
line=line.strip()
X,Y= line.split(',')
x.append(X)
y.append(Y)
dataset.close()
fig =plt.figure()
rect=fig.patch
rect.set_facecolor('#31312e')
ax1= fig.add_subplot(1,1,1,axisbg='grey')
ax1.plot(x,y,'r',linewidth=3.3,linestyle='--')
ax1.set_title('Grafica matplotlib')
ax1.set_xlabel('x')
ax1.set_ylabel('y')
plt.show()

Pgina 1 de 1

Das könnte Ihnen auch gefallen