Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
from wordcloud import WordCloud, STOPWORDS, ImageColorGenerator
import matplotlib.pyplot as plt
word_cloud = [x[0] for x in cnt.most_common(25)]
word_cloud_obj = WordCloud(max_words=25, background_color="white").generate(" ".join(word_cloud))
#word_cloud_obj = WordCloud().generate(" ".join(word_cloud)) #default with ugly black background
plt.imshow(word_cloud_obj, interpolation='bilinear')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment