Created
November 15, 2019 09:44
-
-
Save izikeros/fca85e2d7b9eae3e0d9dec6a1f1635b3 to your computer and use it in GitHub Desktop.
Plot wordcloud from dict in Python
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
from wordcloud import WordCloud | |
wordcloud = WordCloud(background_color='white', | |
width=1500, | |
height=1000 | |
).generate_from_frequencies(dictionary) | |
# use .generate(space_separated_string) - to generate cloud from text | |
plt.figure(figsize=(9,6)) | |
plt.imshow(wordcloud) | |
plt.axis('off') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment