Reputation:
I am very new to machine learning python I am trying to make each cluster of my output with different color here is the code:
mean = (1, 2)
cov = [[1, 0], [0, 1]]
x1, y1 = np.random.multivariate_normal(mean, cov, 500).T
mean = (10, 2)
cov = [[1, 0], [0, 1]]
x2, y2 = np.random.multivariate_normal(mean, cov, 500).T
mean = (5, 5)
cov = [[1, 0], [0, 1]]
x3, y3 = np.random.multivariate_normal(mean, cov, 500).T
aa = [x1,x2,x3]
bb = [y1,y2,y3]
plt.plot(aa, bb, 'x')
plt.axis('equal')
plt.show()
and this is the output I get
i need each cluster to have similar color but not all the same.
Upvotes: 1
Views: 56
Reputation: 150735
Do you mean:
plt.plot(x1,y1, 'x')
plt.plot(x2,y2,'x')
plt.plot(x3,y3, 'x')
plt.axis('equal')
plt.show()
Output:
Upvotes: 2