How to set colours with big contrast on Matplotlib scatter plot

Question:

I want to plot scatter plot of my clusters. I have done it with this:

figure(figsize=(22, 25), dpi = 80)
plt.scatter(reduced_features[:, 0], reduced_features[:,1], c = kmeans.predict(vec_matrix_pca), s = 7)
plt.scatter(reduced_cluster_centers[:, 0], reduced_cluster_centers[:, 1], marker = 'x', s = 120, c = 'r')
plt.grid()
plt.show()

This is the result:

enter image description here

The thing is, as you see, it is very hard to make a difference between clusters.
How can I select different color map, or colours with bigger contrast.
FYI, I have 150 clusters.

Asked By: taga

||

Answers:

You can use plt.style.use(style_name) to set the style sheet. Available style sheets with examples can be found here.

Answered By: wombatonfire
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.