|
| 1 | +# encoding: utf-8 |
| 2 | +import os |
| 3 | +from pyecharts import WordCloud |
| 4 | +# 词云 |
| 5 | +def pythonWordCloud(x,y,label): |
| 6 | + wordcloud = WordCloud(width=1300, height=620) |
| 7 | + wordcloud.add("", x, y, word_size_range=[20, 100],shape="triangle-forward") |
| 8 | + wordcloud.render() |
| 9 | + os.system(r"render.html") |
| 10 | +x = [ |
| 11 | + 'PythonCoder', '爬虫', '人工智能', '大数据', 'Django', |
| 12 | + 'Flask', '机器学习', '数据分析', '深度学习', '运维测试', 'TensorFlow', |
| 13 | + '真实面试经历', '真实面试题', '自然语言处理', 'NLP',"数据处理", |
| 14 | + '500GB资料免费送', '开放源码', '免费学习群', '面试简历', 'JCSON'] |
| 15 | +y = [ |
| 16 | + 10000, 6181, 4386, 4055, 2467, 2244, 1898, 1484, 1112, |
| 17 | + 965, 847, 582, 555, 550, 462, 366, 360, 282, 273, 265,5000] |
| 18 | + |
| 19 | +pythonWordCloud(x,y,"词云") |
| 20 | + |
0 commit comments