You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
365 B

from wordcloud import WordCloud
import matplotlib.pyplot as plt
def make_wordcloud(count_dict):
wc = WordCloud(background_color='white', width=800, height=600)
text = " ".join([keyword + " " * count for keyword, count in count_dict.items()])
wc.generate(text)
plt.imshow(wc, interpolation='bilinear')
plt.axis('off')
plt.show()