1 Star 0 Fork 1

莫世威/pyecharts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
test_wordcloud.py 992 Bytes
一键复制 编辑 原始数据 按行查看 历史
chenjiandongx 提交于 8年前 . version 0.1.1
#!/usr/bin/env python
#coding=utf-8
from pyecharts import WordCloud
def test_wordcloud():
# wordcloud_0
name = ['Sam S Club', 'Macys', 'Amy Schumer', 'Jurassic World', 'Charter Communications',
'Chick Fil A', 'Planet Fitness', 'Pitch Perfect', 'Express', 'Home', 'Johnny Depp',
'Lena Dunham', 'Lewis Hamilton', 'KXAN', 'Mary Ellen Mark', 'Farrah Abraham',
'Rita Ora', 'Serena Williams', 'NCAA baseball tournament', 'Point Break']
value = [10000, 6181, 4386, 4055, 2467, 2244, 1898, 1484, 1112, 965, 847, 582, 555,
550, 462, 366, 360, 282, 273, 265]
wordcloud = WordCloud(width=1300, height=620)
wordcloud.add("", name, value, word_size_range=[30, 100], rotate_step=66)
wordcloud.show_config()
wordcloud.render()
# wordcloud_1
wordcloud = WordCloud(width=1300, height=620)
wordcloud.add("", name, value, word_size_range=[30, 100], shape='diamond')
wordcloud.show_config()
wordcloud.render()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/Mirrorpy/pyecharts.git
git@gitee.com:Mirrorpy/pyecharts.git
Mirrorpy
pyecharts
pyecharts
master

搜索帮助