Update 102201214 许莎莎.py

main
pg78ac9nr 2 months ago
parent aacd7512ee
commit 09e1fd124b

@ -163,14 +163,3 @@ ws.column_dimensions['A'].width = 60
wb.save(excel_path) wb.save(excel_path)
ai_str = '\n'.join(ai_list) #分割成字符型 ai_str = '\n'.join(ai_list) #分割成字符型
#绘制词云图
img = imageio.imread('test2.png')
wc = wordcloud.WordCloud(
width = 700,
height = 700,
mask=img,
background_color = 'black',
font_path = 'msyh.ttc'
)
wc.generate(ai_str)
wc.to_file('词云.png')
Loading…
Cancel
Save