使用python做云词图片
import wordcloud
import matplotlib.pyplot as plt
#读取文件
f = open("ciyun.txt", "r", encoding="utf-8") # 使用的词语语料
t = f.read()
f.close()
#使用wordcloud 生成云图
w = wordcloud.WordCloud(
width = 2000, height =1700,
background_color = "white",
font_path = "msyh.ttc"
原创
2021-05-29 23:38:53 ·
199 阅读 ·
0 评论