亚洲精品久久久中文字幕-亚洲精品久久片久久-亚洲精品久久青草-亚洲精品久久婷婷爱久久婷婷-亚洲精品久久午夜香蕉

您的位置:首頁(yè)技術(shù)文章
文章詳情頁(yè)

Python數(shù)據(jù)可視化圖實(shí)現(xiàn)過程詳解

瀏覽:6日期:2022-07-21 14:30:56

python畫分布圖代碼示例:

# encoding=utf-8import matplotlib.pyplot as pltfrom pylab import * # 支持中文 mpl.rcParams[’font.sans-serif’] = [’SimHei’]# ’mentioned0cluster’,names = [’mentioned1cluster’,’mentioned2cluster’, ’mentioned3cluster’, ’mentioned4cluster’, ’mentioned5cluster’, ’mentioned6cluster’, ’mentioned7cluster’, ’mentioned8cluster’, ’mentioned9cluster’, ’mentioned10cluster’]x = range(len(names))# y_0625 = [39266,56796,42996,24872,13849,8609,5331,1971,554,169,26] y_0626_1=[4793,100,0,0,0,0,0,0,0,0]# y_0626_2=[2622,203,0,0,0,0,0,0,0,0,0] # plt.plot(x, y, ’ro-’)# plt.plot(x, y1, ’bo-’)# pl.xlim(-1, 11) # 限定橫軸的范圍# pl.ylim(-1, 110) # 限定縱軸的范圍plt.plot(x, y_0626_1, marker=’o’, mec=’r’, mfc=’w’, label=’HighRating:MentionedClusterNum Distribution’)# plt.plot(x, y_0626_2, marker=’o’, mec=’r’, mfc=’w’, label=’LowRating:MentionedClusterNum Distribution’)# plt.plot(x, y1, marker=’*’, ms=10, label=u’y=x^3曲線圖’)plt.legend() # 讓圖例生效plt.xticks(x, names, rotation=45)plt.margins(0)plt.subplots_adjust(bottom=0.15)# plt.xlabel(u'time(s)鄰居') # X軸標(biāo)簽plt.xlabel('clusters')plt.ylabel('number of reviews') # Y軸標(biāo)簽plt.title('A simple plot') # 標(biāo)題 plt.show()

效果如下:

Python數(shù)據(jù)可視化圖實(shí)現(xiàn)過程詳解

python畫分布圖的思路:

先在列表中定義分布圖x、y軸的數(shù)值,然后使用plt.plot()方法即可將分布圖繪制出來。

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持好吧啦網(wǎng)。

標(biāo)簽: Python 編程
相關(guān)文章:
主站蜘蛛池模板: 亚洲精品国产一区二区三区四区 | 久久精品国产线看观看亚洲 | 欧美日韩免费在线 | 成人综合色站 | 韩国女主播精品一区二区 | 久久大尺度 | 国产哺乳期奶水avav | 慈禧级淫片a级中文在线 | 亚洲欧美久久精品一区 | 成年黄色网址 | mmmmxxxx国产在线观看 | 亚洲欧美日韩中文综合v日本 | 亚洲 日本 欧美 中文幕 | 欧美一区二区手机在线观看视频 | 72种姿势欧美久久久久大黄蕉 | 日本在线日本中文字幕日本在线视频播放 | 久久精品国产精品青草 | 妖精视频永久在线入口 | 亚洲精品亚洲人成在线播放 | 欧美国产综合视频在线观看 | 日本高清www免费视频 | 天天影视色香欲综合网天天录日日录 | 欧美另类老人xxxx | 国产一区免费视频 | 免费观看好看的国产片 | 毛片免费看牛牛影视 | 免费国产成人高清在线观看不卡 | 五月婷婷六月天 | 免费播放国产一级 | 国产精品毛片在线大全 | 亚洲欧美一区二区久久 | 日本人妖tubexxxx | 日韩黄色一级片 | 亚洲国产欧美自拍 | 亚洲tv精品一区二区三区 | 欧美日韩第二页 | 欧美日韩高清不卡一区二区三区 | 爱爱网站免费 | 黄色一级片毛片 | 国产一级在线现免费观看 | 亚洲成人网在线 |