Tuesday, April 28, 2020


# # csv file loaded


import matplotlib.pyplot as plt
import csv

x = []
y = []
with open('example.txt', 'r') as csvfile:
    plots = csv.reader(csvfile, delimiter = ',')
    for row in plots:
        x.append((row[0]))
        y.append((row[1]))

plt.plot(x,y, label = 'Loaded file...!!!')
plt.xlabel('x')
plt.ylabel('y')
plt.title('Graph')
plt.legend()
plt.show()


No comments:

Post a Comment