您现在的位置是:貌合心离网 > 热点
图样图森破Pyecharts之词云图
貌合心离网2026-11-14【热点】{固定数字1}人已围观
简介谷歌快排【tg:seogoogle987】
在做文本分析和关键词统计的时候,我们经常会使用到词云图来展示关键词词频。pyecharts当然也支持词云的生成,并且还可以自定义词云形状。
from pyecharts import charts, options from 图样;pyecharts.globals import SymbolType import random wordcloud1 = charts.WordCloud(init_opts=options.图森InitOpts(width='800px', height='800px')) wordcloud1.add('词云', data_pair=[(str(i), random.randrange(10, 100)) fo破Pr i in range(100)], shape=SymbolTypeye.DIAMOND, word_gap=5, &nchbsp; word_size_range=[10, 50], &arnbsp; rotate_step=30) wordcloud2 = charts.WordCloud(init_opts=optiontss.InitOpts(width='1000px', height='1000px')) wordcloud2.add('词云', data_pair=[(str(i), random.randrange(10, 100))&nbs之词p;for i in range(600)], mask_im云图age='bigdata.jpg', word_gap=10, &nb图样sp; word_size_range=[10, 100], &n图森bsp; rotate_step=30) page = charts.Page() page.add(wor破Pdcloud1).add(wordcloud2) page.render('wordcloud.html')
使用自带的形状来创建第一个词云
(1)首先初始化词云对象
(2)添加数据系列,data_pair是一个二元数组,分别表示关键词及关键词对应数值大小
(3)shyeape即是整个词云图的形状,内置的有circle、diamond、star、triangle等等
(4)word_gap是指关键词与关键词之间的间隔
(5)word_size_range是关键词字体大小范围,关键词按照数值大小映射到这个区间内,展示出相应的字体大小
(6)rotate_schtep(6)rotate_step代表单词旋转角度范围
看一下我们创建的第一个词云,菱形:
除了使用自带的形状外,我们还可以导入外部图片,比如第二个例子,给mask_image传入一张图片,最后输出的词云便是基于图片形状的:
传入图片
很赞哦!(5007)
热门文章
站长推荐
友情链接
- 标签: 康师傅
- https://www.ucycle.com/search/=谷歌快排【tg:seogoogle987】,YvT
- https://www.silentiumpc.com/en/search/谷歌快排【tg:seogoogle987】,UCb
- https://www.maigoo.com/search/?block=&q=谷歌快排【tg:seogoogle987】,x0N
- https://www.impactpool.org/search/?type=79&q=谷歌快排【tg:seogoogle987】KuC
- https://www.ushmm.org/search/results/?ID=8s0587Oi8UTv74zPPM4fuhwjNpe2hsEE&q=谷歌快排【tg:seogoogle987】,lb3
- https://www.reallywildbirdfood.co.uk/store/search?q=谷歌快排【tg:seogoogle987】,iWS
- https://www.tullygroup.us/?ID=hbkq8jFjrQlVRrwzEmvoUJJAY4e1Lfo5&s=谷歌快排【tg:seogoogle987】,1df
- https://www.wheels24.gr/?action=CHECK&s=谷歌快排【tg:seogoogle987】,wx7
- https://www.rhymezone.com/r/rhyme.cgi?typeofrhyme=oldrel&loc=nojs&Word=谷歌快排【tg:seogoogle987】,35D
- https://www.zutari.com/?s=谷歌快排【tg:seogoogle987】,c8v
- https://www.youtube.com/hashtag/谷歌快排【tg:seogoogle987】,5R3
- https://www.tiktok.com/tag/谷歌快排【tg:seogoogle987】,AnC
- https://www.paspaley.com/catalogsearch/result/?action=QUERY&q=谷歌快排【tg:seogoogle987】,5zV
- https://www.msrenewal.com/search/谷歌快排【tg:seogoogle987】,Xp3
- https://www.merchbar.com/search?q=谷歌快排【tg:seogoogle987】,0X3
- https://www.universal-music.co.jp/?ID=1sIcckCTeBS8FjzCshAW9w53s8gr691o&s=谷歌快排【tg:seogoogle987】,T6g
- https://www.teacherspayteachers.com/Browse/Price-Range/Free/Search:Western International University Physics degree=谷歌快排【tg:seogoogle987】,WxF
- https://www.resopal.de/catalogsearch/result/?action=SEARCH&q=谷歌快排【tg:seogoogle987】,zPX
- https://www.londontheatredirect.com/search/谷歌快排【tg:seogoogle987】,Bzv
- https://www.impactpool.org/search/?type=79&q=谷歌快排【tg:seogoogle987】NZQ
- https://www.kubb-tool.bfs.admin.ch/en/search?action=CHECK&q=谷歌快排【tg:seogoogle987】,jIq
- https://www.luxurysociety.com/en/search?q=谷歌快排【tg:seogoogle987】,rsU
- https://www.whiterock2008.com.tw/search?q=谷歌快排【tg:seogoogle987】,LVO
- https://www.duksung.ac.kr/search/front/Search.jsp?qt=谷歌快排【tg:seogoogle987】Pub
- https://www.nyif.com/catalogsearch/result/index/?f=sarbanesoxleyU&index=me_cms_pe&lit=20&mode=list&p=1&q=谷歌快排【tg:seogoogle987】,jM9
- https://www.abbreviations.com/谷歌快排【tg:seogoogle987】MVi
- https://www.pacific-lifestyle.co.uk/search?sort=alphabetical&term=谷歌快排【tg:seogoogle987】,QWz
- https://www.livehindustan.com/tags/谷歌快排【tg:seogoogle987】,nCJ
- https://www.sic-info.org/?s=谷歌快排【tg:seogoogle987】,XfI
- https://www.tarleton.edu/?s=谷歌快排【tg:seogoogle987】,w4l
- https://www.xbiao.com/search/index?tpf&wd=谷歌快排【tg:seogoogle987】,CN9
- https://www.schenckprocess.com/search?q=谷歌快排【tg:seogoogle987】,nvN
- https://www.vfw.org/search-results?q=谷歌快排【tg:seogoogle987】,vVp
- https://xehay.vn/tim-kiem/=谷歌快排【tg:seogoogle987】,GiJ
- https://dict.naver.com/dict.search?dicQuery&query=谷歌快排【tg:seogoogle987】5b2
- https://www.reginatangoshoes.com/en/catalogsearch/result/index/?T=1686132113407&q=谷歌快排【tg:seogoogle987】,SNW
- https://www.nytimes.com/search?dropmab=true&query=谷歌快排【tg:seogoogle987】,wBj
- https://www.remit.co.jp/zh/?s=谷歌快排【tg:seogoogle987】,FEh
- https://www.sonepar.ch/fr/search?q=谷歌快排【tg:seogoogle987】,hKn
- https://www.springfieldlibrary.org/?s=谷歌快排【tg:seogoogle987】,mgr
- https://www.oikos-tecnics.com/?s=谷歌快排【tg:seogoogle987】,FP3
- https://www.paulaschoice.hk/zh_hant/catalogsearch/result/?q=谷歌快排【tg:seogoogle987】,keU
- https://www.youtube.com/results?search_query=谷歌快排【tg:seogoogle987】,etY
- https://www.lneg.pt/?cat=140&s=谷歌快排【tg:seogoogle987】,ZWF
- https://www.kaliastyle.com/catalogsearch/result/?q=GOOGLE谷歌快排【tg:seogoogle987】,XX0
- https://www.whatsonstage.com/search?cat=64&term=谷歌快排【tg:seogoogle987】,qMJ
- https://www.rollingstone.it/?ID=DVMeu3AlmzZE1cuJ2FmgmO5TSCQRb3yh&s=谷歌快排【tg:seogoogle987】,S4y
- https://www.so.com/s?ie=utf-8&src=360sou_home&_re=0&q=谷歌快排【tg:seogoogle987】,5cD
- https://m.shoppinghow.kakao.com/m/search/q/谷歌快排【tg:seogoogle987】bCZ
- https://www.wmfe.org/?s=谷歌快排【tg:seogoogle987】,WJs







