K-means implementation with Python and representation using matplotlib