iPDC-suite/iPDC/plot_kmeans1.py

30 lines
459 B
Python
Raw Normal View History

2022-10-24 20:30:30 +05:30
import csv
import pandas as pd
import matplotlib.pyplot as plt
x=[]
y=[]
x1=[]
y1=[]
2022-10-25 23:58:31 +05:30
x2=[]
y2=[]
2022-10-24 20:30:30 +05:30
with open('points.csv', mode ='r') as file:
csvFile = csv.reader(file)
for lines in csvFile:
print(lines)
x.append(float(lines[0]))
y.append(0)
2022-10-25 23:58:31 +05:30
x1.append(float(lines[1]))
2022-10-24 20:30:30 +05:30
y1.append(0)
2022-10-25 23:58:31 +05:30
x2.append(float(lines[2]))
y2.append(0)
2022-10-24 20:30:30 +05:30
plt.scatter(x, y)
plt.scatter(x1, y1)
2022-10-25 23:58:31 +05:30
plt.scatter(x2,y2)
2022-10-24 20:30:30 +05:30
plt.show()