I have the following code to apply the multidimensional scaling to sample of data called parkinsonData
:
iterations=4
count=0
while(count<iterations):
mds1=manifold.MDS(n_components=2, max_iter=3000)
pos=mds1.fit(parkinsonData).embedding_
plt.scatter(pos[:, 0], pos[:, 1])
count=count+1
With this I get 4 different plots of this MDS algorithm, all of them are different due to the random seed. These plots have different color, but parkinsonData
has a column called status
that has 0 or 1 values and I want to show this difference in every plot with different color.
For example I want to achieve:
One plot with one color for 0 values in status field, and a different color for 1 values in status field.
Second plot with one color for 0 values in status field, and a different color for 1 values in status field. (Both colors differents from the first plot)
Third plot with one color for 0 values in status field, and a different color for 1 values in status field. (Both colors differents from the first and second plot)
Fourth plot with one color for 0 values in status field, and a different color for 1 values in status field. (Both colors differents from the first, second and third plot)
Anyone knows how to achieve this expected behavior?