K-Means Clustering too crowded I have written a simple python code that opens a csv files and then clusters the values of one column. There around 10k rows

This is my code

import pandas as pd
import numpy as np
import random as rd
import matplotlib.pyplot as plt

data = pd.read_csv('file.csv', encoding='unicode_escape')

data.head()

feature_names = ['numbers_col']
X = np.asarray(data[feature_names])

from sklearn.cluster import KMeans

labels = KMeans(5, random_state=10).fit_predict(X)
plt.scatter(X[:, 0], X[:, 0], c=labels,
            s=50, cmap='rainbow');



This is how the result looks like 



The result doesn't look that good it looks all liner and the clusters are shown just like dots.

I am asking for some advice so my output would look more  towards what a normal K-Means output looks like: Example
The figure looks exactly how it should.

plt.scatter(X[:, 0], X[:, 0], c=labels, s=50, cmap='rainbow');


You are plotting the a value again itself, in two dimensions it will give you a line of the form y = x
Check what you want to plot, if you have only one feature it doesn't mean that the K-Means wouldn't work, you will have a clustering, but the plot its correct.