How to plot data points and not centroids using sklearn k-means? I have issues finding a way to plot data points colored by cluster with k-means.

I have a very long list of strings.I managed to plot the centroids but not the data points;

import matplotlib.pyplot as plt
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.cluster import KMeans

vectorizer = TfidfVectorizer(stop_words='english')
X = vectorizer.fit_transform(cleans)

true_k = 5
model = KMeans(n_clusters=true_k, init='k-means++', max_iter=100, n_init=1)
model.fit(X)
print("Top terms per cluster:")
order_centroids = model.cluster_centers_.argsort()[:, ::-1]
terms = vectorizer.get_feature_names()
for i in range(true_k):
    print("Cluster %d:" % i),
    for ind in order_centroids[i, :10]:
        print(' %s' % terms[ind]),
    print()

print("\n")

plt.scatter(order_centroids[:, 0],order_centroids[:, 1], marker="x", s=150, linewidths=5, zorder=10)
plt.show()


I expect the output to be the data points colored by cluster, and not the centroids
Scatter plots work well for 2 dimensional, continuous data. Like the toy examples you see everywhere.

But the data produced by tfidfvectorizer is high-dimensional and sparse.

It is to be expected that almost all points will have a 0 value in any two dimensions you plot. One does not simply plot test as 2d coordinates in a meaningful way. And regular k-means doesn't work that well either. The means just move close together, and all correspond to average stopword vectors - not very useful.