分类:Python
2020
10-09
代码如下importmatplotlib.pyplotaspltimportnumpyasnpdeftest4():names=['电影1','电影2','电影3']real_num1=[7548,4013,1673]real_num2=[5453,1840,1080]real_num3=[4348,2345,1890]x=np.arange(len(names))#绘制柱形图width=0.3plt.bar(x,real_num1,alpha=0.5,width=width,label=names[0])plt.bar([i+widthforiinx],real_num2,alpha=0.5,width=width,label=names[1...
继续阅读 >
词云图frompyecharts.chartsimportWordClouddefword1():words=[("SamSClub",10000),("Macys",6181),("AmySchumer",4386),("JurassicWorld",4055),("CharterCommunications",2467),("ChickFilA",2244),("PlanetFitness",1868),("PitchPerfect",1484),("Express",1112),("Home",865),("JohnnyDepp",847),("LenaDunham",582),("LewisHamilton",...
继续阅读 >
2020
10-09