d <- density(mtcars$mpg)
plot(d, main=”Kernel Density of Miles Per Gallon”)

polygon(d, col=”red”, border=”blue”) # Filled Density Plot

版权声明:本文为liuhui0622原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/liuhui0622/p/5125106.html