[R] ggplot 2: Histogram with bell curve?

dicko ahmadou dicko.ahmadou at gmail.com
Tue Jun 7 20:40:43 CEST 2011


Hi

Don't use t as var names, because t is also a function (transpose).
This code should work...
set.seed(1)
T <- rnorm(500)
qplot(T, geom = "blank") + 
geom_histogram(aes(y = ..density..), colour = "black", fill = "blue") + 
stat_density(geom = "line", colour = "red")



--
View this message in context: http://r.789695.n4.nabble.com/ggplot-2-Histogram-with-bell-curve-tp3580359p3580457.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list