🔥AI副业赚钱星球

点击下面图片查看

郭震AI

150

编辑日期: 2024-11-28 文章阅读:

@author jackzhenguo
@desc
@tag
@version 
@date 2020/02/17
from pyecharts import options as opts
from pyecharts.charts import Page, WordCloud
from pyecharts.globals import SymbolType

words = [
    ("Python", 100),
    ("C++", 80),
    ("Java", 95),
    ("R", 50),
    ("JavaScript", 79),
    ("C", 65)
]

def wordcloud() -> WordCloud:
    c = (
        WordCloud()
        .add("", words, word_size_range=[20, 100], shape='cardioid')
        .set_global_opts(title_opts=opts.TitleOpts(title="WordCloud"))
    )
    return c

wordcloud().render('./img/wordcloud.html')     

上一个例子 下一个例子

京ICP备20031037号-1