v<-rnorm(10000) hist(v,breaks=50,col="orange",freq=FALSE,ylim=c(0,0.5),xlim=c(-4,4)) x<-seq(-4,4,0.1) lines(x,dnorm(x),col="blue",lwd=2) lines(density(v))