Created
February 27, 2019 22:09
-
-
Save hamletbatista/0dc856ee8f42ae9f8a99a6571222bd85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') | |
plt.axis("off") | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment