from wordcloud import WordCloud
import matplotlib.pyplot as plt
import jieba
my_dpi = 96
plt.figure(figsize=(480 / my_dpi, 480 / my_dpi), dpi=my_dpi)
text = ("Python Python Python Matplotlib Matplotlib Seaborn Network Plot Violin Charts Pandas AiePlane APPLE Spider Radar Parrallel Alpha Color Brewer Density Scatter Barplot Barplot Boxplot too young to people Stacked Area Chart Chart software Dataviz Donut Pie Time-Series Fuckerman Wordcloud monkey Sankey Bubble person Intnent Spiderman butterfly ")
# 为了去除一些单词
wordcloud = WordCloud(width=480, height=480, stopwords=["Python", "Matplotlib"]).generate(text)
plt.imshow(wordcloud, interpolation="bilinear")
plt.axis("off")
plt.margins(x=0, y=0)
plt.show()
绘制结果大致如下: