Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from wordcloud import WordCloud
- def wordcloud(counter):
- """A small wordloud wrapper"""
- wc = WordCloud(width=1200, height=800,
- background_color="white",
- max_words=200)
- wc.generate_from_frequencies(counter)
- # Plot
- fig=plt.figure(figsize=(6, 4))
- plt.imshow(wc, interpolation='bilinear')
- plt.axis("off")
- plt.tight_layout(pad=0)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement