Created
September 5, 2018 21:59
-
-
Save julia-git/535d7b49dcd27b1916d7043d6308bfbe to your computer and use it in GitHub Desktop.
word_cloud_function
This file contains hidden or 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
def generate_wordcloud(words, mask): | |
word_cloud = WordCloud(width = 512, height = 512, background_color='white', stopwords=STOPWORDS, mask=mask).generate(words) | |
plt.figure(figsize=(10,8),facecolor = 'white', edgecolor='blue') | |
plt.imshow(word_cloud) | |
plt.axis('off') | |
plt.tight_layout(pad=0) | |
plt.show() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment