w.generate(txt) 向WordCloud对象中加载文本txt
w = wordcloud.WorldCloud()
w.generate("Python and wordcloud")
w.to_file(filename) 将词云输出为图像文件,.png格式或.jpg格式
w = wordcloud.WorldCloud()
w.to_file("outfile.png")
微信扫一扫
w.generate(txt) 向WordCloud对象中加载文本txt
w = wordcloud.WorldCloud()
w.generate("Python and wordcloud")
w.to_file(filename) 将词云输出为图像文件,.png格式或.jpg格式
w = wordcloud.WorldCloud()
w.to_file("outfile.png")
相关推荐