频率分布折线图与总体密度曲线

clip_image001

clip_image002

R语言举例

> x = c(29.6, 28.2, 19.6, 13.7, 13.0, 7.8, 3.4, 2.0, 1.9, 1.0, 0.7, 0.4, 0.4, 0.3, 0.3, 0.3, 0.3, 0.3, 0.2, 0.2, 0.2, 0.1, 0.1, 0.1, 0.1, 0.1)
> a = hist(x,breaks=seq(-3,3,by=0.5))
> lines( c(min(a$breaks), a$mids, max(a$breaks)), c(0,a$counts,0), type='l' )
原文地址:https://www.cnblogs.com/gispathfinder/p/5770103.html