title: How to plot clusters using k means with datasets of tweets?
body: <p>I have a dataset containing tweets, after pre processing the tweets i tried clustering them:</p>
  <pre><code># output the result to a text file.
  
  clusters = df.groupby('cluster')    
  
  for cluster in clusters.groups:
      f = open('cluster'+str(cluster)+ '.csv', 'w') # create csv file
      data = clusters.get_group(cluster)[['id','Tweets']] # get id and tweets columns
      f.write(data.to_csv(index_label='id')) # set index to id
      f.close()
  
  
  print(&quot;Cluster centroids: \n&quot;)
  order_centroids = model.cluster_centers_.argsort()[:, ::-1]
  terms = vectorizer.get_feature_names()
  
  for i in range(k):
      print(&quot;Cluster %d:&quot; % i)
      for j in order_centroids[i, :10]: #print out 10 feature terms of each cluster
          print (' %s' % terms[j])
      print('------------')
  </code></pre>
  <p>Hence it is grouping my tweets in 6 clusters. How can i plot them in 2D as a whole?</p>