Excuse me little knowledge in python but im trying to output a csv file(csvfile) dataset in a 3d graph. my code so far is as follows:
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import csv
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
with open('new3.csv') as csvfile:
readCSV = csv.reader(csvfile, delimiter=',')
next(readCSV)
next(readCSV)
next(readCSV)
XS =[]
YS =[]
ZS =[]
for column in readCSV:
xs = column[1]
ys = column[2]
zs = column[3]
XS.append(xs)
YS.append(ys)
ZS.append(zs)
ax.scatter(XS, YS, ZS, c='r', marker='o')
ax.set_xlabel('X Label')
ax.set_ylabel('Y Label')
ax.set_zlabel('Z Label')
plt.show()
But i keep coming up with the error in the Title. Any help is appreciated
