您现在的位置是:热点 >>正文
图样图森破Pyecharts之词云图
热点76677210人已围观
简介...
在做文本分析和关键词统计的时候,我们经常会使用到词云图来展示关键词词频。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)) for&n破Pbsp;i in range(100)], shape=SymbolTypyee.DIAMOND, word_gap=5,  ch; word_size_range=[10, 50], &nbarsp; rotate_step=30) wordcloud2 = charts.WordCloud(init_opts=options.tsInitOpts(width='1000px', height='1000px')) wordcloud2.add('词云', data_pair=[(str(i), random.randrange(10, 100)) for&之词nbsp;i in range(600)], mask_image='bigdat云图a.jpg', word_gap=10, &nbs图样p; word_size_range=[10, 100], &图森nbsp; rotate_step=30) page = charts.Page() page.add(wordcloud1).a破Pdd(wordcloud2) page.render('wordcloud.html')
使用自带的形状来创建第一个词云
(1)首先初始化词云对象
(2)添加数据系列,data_pair是一个二元数组,分别表示关键词及关键词对应数值大小
(3)shape即是整个词云图的形状ye,内置的有circle、diamond、star、triangle等等
(4)word_gap是指关键词与关键词之间的间隔
(5)word_size_range是关键词字体大小范围,关键词按照数值大小映射到这个区间内,展示出相应的字体大小
(6)rotate_step(6)rotate_stchep代表单词旋转角度范围
看一下我们创建的第一个词云,菱形:
除了使用自带的形状外,我们还可以导入外部图片,比如第二个例子,给mask_image传入一张图片,最后输出的词云便是基于图片形状的:
传入图片
Tags:
相关文章
标签: 原神 米哈游 封号
热点云梦级11月8日云梦级消息,米哈游官方今天在米游社发布公告,称部分玩家长期以来在《原神》游戏使用鼠标宏、自动化脚本等第三方违规工具,严重危害游戏公平性。 为了维护游戏环境公平,米哈游在近期上线了更严格...
【热点】
阅读更多十个 Python 小技巧,覆盖了90%的数据分析需求!
热点数据分析师日常工作会涉及各种任务,比如数据预处理、数据分析、机器学习模型创建、模型部署。 在本文中,我将分享10个 Python 操作,它们可覆盖90%的数据分析问题。有所收获点赞、收藏、关注。 1、...
【热点】
阅读更多标签: 欧菲光 智能手机摄像头 智能汽车视觉 机器视觉深度相机
热点云梦级4月1日云梦级消息,4月1日,欧菲光(002456)公布2025年年报,公司营业收入为221.5亿元,同比上升8.4%;归母净利润为4163万元,同比下降28.7%;扣非归母净利润自去年同期亏损...
【热点】
阅读更多
热门文章
最新文章
友情链接
- 标签: 康师傅
- https://www.openstreetmap.org/search?query=谷歌留痕外推【tg:seogoogle987】,fkX
- https://www.duksung.ac.kr/search/front/Search.jsp?qt=谷歌留痕外推【tg:seogoogle987】sg3
- https://www.nextavenue.org/?action=QUERY&s=谷歌留痕外推【tg:seogoogle987】,cas
- https://www.kelsa.co.uk/catalogsearch/result/index/?T=1686132119291&q=谷歌留痕外推【tg:seogoogle987】,g4u
- https://www.ucycle.com/search/=谷歌留痕外推【tg:seogoogle987】,gJq
- https://yokohama-oht.com/?action=CHECK&s=谷歌留痕外推【tg:seogoogle987】,eSN
- https://www.scq.ubc.ca/?page=2&s=谷歌留痕外推【tg:seogoogle987】,29W
- https://www.pixiv.net/tags/谷歌留痕外推【tg:seogoogle987】,XcX
- https://www.stormberg.com/no/search?q=谷歌留痕外推【tg:seogoogle987】,XlE
- https://www.klatreverden.no/search?q=谷歌留痕外推【tg:seogoogle987】,411
- https://www.teacherspayteachers.com/Browse/Price-Range/Free/Search:Western International University Physics degree=谷歌留痕外推【tg:seogoogle987】,4ml
- https://www.roberthalf.com/us/en/jobs/all/谷歌留痕外推【tg:seogoogle987】WVu
- https://www.lssystems.co.uk/search?page=0&per_page=24&term=谷歌留痕外推【tg:seogoogle987】,xuK
- https://www.zalora.sg/catalog/?cat=112&q=谷歌留痕外推【tg:seogoogle987】,28t
- https://www.navylookout.com/?ID=nSBR6Ivdu6lZg1yr2SDs30Lo5sTs76yJ&s=谷歌留痕外推【tg:seogoogle987】,Zno
- https://www.niaogebiji.com/pc/article/search?keyword=谷歌留痕外推【tg:seogoogle987】,Wh2
- https://www.woorden.org/spreekwoord.php?woord=谷歌留痕外推【tg:seogoogle987】,R8i
- https://www.pickett.co.uk/collections/vendors?q=谷歌留痕外推【tg:seogoogle987】,Ap2
- https://www.takachi-enclosure.com/search?eqYB=gnI31Ou&text=谷歌留痕外推【tg:seogoogle987】,idz
- https://www.tcv.org.uk/search/谷歌留痕外推【tg:seogoogle987】,tGe
- https://www.rotherham.gov.uk/site-search/results/?q=谷歌留痕外推【tg:seogoogle987】,k22
- https://www.vocabulary.com/dictionary/谷歌留痕外推【tg:seogoogle987】,k7Y
- https://xehay.vn/tim-kiem/=谷歌留痕外推【tg:seogoogle987】,SRd
- https://www.pinkpanda.ro/magazin/ingrijirea-tenului?page=87&q=谷歌留痕外推【tg:seogoogle987】,Za8
- https://www.wuv.edu/?s=谷歌留痕外推【tg:seogoogle987】,nK0
- https://www.unclefossil.com/search/谷歌留痕外推【tg:seogoogle987】gad_source=1&gclid=Cj0KCQjw_-GxBhC1ARIsADGgDjsNKplUXa2F6YGlHBK2sHDQ88cgsJBb05DyO99TV9jNq_cT0kGMqyQaAgHQEALw_wcB
- https://www.wikiart.org/pt/Search/谷歌留痕外推【tg:seogoogle987】,uM7
- https://blvdseafood.com/?s=谷歌留痕外推【tg:seogoogle987】HyE
- https://www.abbreviations.com/谷歌留痕外推【tg:seogoogle987】Nyl
- https://blvdseafood.com/?s=谷歌留痕外推【tg:seogoogle987】hn2
- https://www.repetto.jp/item/search?action=QUERY&q=谷歌留痕外推【tg:seogoogle987】,ldT
- https://www.mygrandma.com/Items.aspx?search=谷歌留痕外推【tg:seogoogle987】,utk
- https://www.sogou.com/web?query=谷歌留痕外推【tg:seogoogle987】,9im
- https://www.wheels24.gr/?action=CHECK&s=谷歌留痕外推【tg:seogoogle987】,Z0y
- https://www.yr.no/en/search?q=谷歌留痕外推【tg:seogoogle987】,t25
- https://www.tycoonstory.com/?s=谷歌留痕外推【tg:seogoogle987】,oKA
- https://www.tarleton.edu/?s=谷歌留痕外推【tg:seogoogle987】,Tv2
- https://www.localfootdoc.com/?s=谷歌留痕外推【tg:seogoogle987】,7no
- https://www.mintos.org/?s=谷歌留痕外推【tg:seogoogle987】,urL
- https://www.goodreads.com/quotes/tag/谷歌留痕外推【tg:seogoogle987】lRF
- https://www.lezhin.com/ko/tags/谷歌留痕外推【tg:seogoogle987】,Hbw
- https://www.tombow.com/en/search/谷歌留痕外推【tg:seogoogle987】,kUb
- https://www.teamlab.art/th/?submit=谷歌留痕外推【tg:seogoogle987】,uYk
- https://www.parl.ca/legisinfo/fr/projets-de-loi?parlsession=all&view=list&keywords=谷歌留痕外推【tg:seogoogle987】,gmm
- https://www.paxnet.co.kr/search/jongmok?kwd=谷歌留痕外推【tg:seogoogle987】92L
- https://www.whiterock2008.com.tw/search?q=谷歌留痕外推【tg:seogoogle987】,KRV
- https://wydden.com/?ID=r8w9WMSKWkOcmiaFWaUv0dzMdqZWfKtF&s=谷歌留痕外推【tg:seogoogle987】,wN0
- https://www.kaskus.co.id/search?q=谷歌留痕外推【tg:seogoogle987】,u1H
- https://www.rookwinkel.nl/catalogsearch/result/index/?q=谷歌留痕外推【tg:seogoogle987】,X7e
- https://www.kaliastyle.com/catalogsearch/result/?q=GOOGLE谷歌留痕外推【tg:seogoogle987】,QDq