Python数据可视化五密度分布图绘
北京哪里治疗白癜风比较好 http://m.39.net/pf/bdfyy/使用matplotlib包绘制密度分布图
上一篇文章: ggplot2绘制多样性指数图 下一篇文章: UnderstandingObject
#Importlibrariesimportmatplotlib.pyplotaspltimportnumpyasnpfromscipy.statsimportgaussian_kde
#Builddummydatadata=[1.5]*7+[2.5]*2+[3.5]*8+[4.5]*3+[5.5]*1+[6.5]*8data[1:10][1.5,1.5,1.5,1.5,1.5,1.5,2.5,2.5,3.5]
#Builda"density"functionbasedonthedataset#WhenyougiveavaluefromtheXaxistothisfunction,itreturnstheaccordingvalueontheYaxisdensity=gaussian_kde(data)density.covariance_factor=lambda:.25density._
转载请注明:http://www.sonphie.com/jbzl/14208.html