I am trying to plot a scatter plot using mplot3d but the scatter method gives me value error: 'xs' and 'ys' must be of the same size. When I print their types and sizes, they appear perfect. I am unable to figure out whats wrong.
Here is the part of my code :
'mat2' is 512 X 4 matrix that is already computed.
mat2 = np.array(mat2)
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
co = []
xx = mat2[:,:1]
yy = mat2[:,:2]
z = mat2[:,:3]
co = mat2[:,:4]
#printing the size and types of the arguments to the scatter()
print(str(len(xx))+str(type(xx))+' '+str(len(yy))+str(type(yy))+' '+str(len(z))+' '+str(len(co)))
ax.scatter(np.array(xx), np.array(yy), z=np.array(z), c=np.array(co), cmap=plt.hot())
Here is a screenshot of the output that I get - ValueError Screenshot
Any help ?