by aton on 4/12/13, 4:09 AM with 20 comments
by jfim on 4/12/13, 5:30 AM
In R, one can simply do:
library("ggplot2")
library("datasets")
ggplot(faithful, aes(x=eruptions)) + geom_density() + geom_rug()
which gives a chart like this (http://jean-francois.im/temp/eruptions-kde.png). Contrast with: ggplot(faithful, aes(x=eruptions)) + geom_histogram(binwidth=1)
which gives a chart like this (http://jean-francois.im/temp/eruptions-histogram.png).Edit: Other plots mentioned in this discussion:
ggplot(faithful, aes(x = eruptions)) + stat_ecdf(geom = "step")
Cumulative distribution, as suggested by leot (http://jean-francois.im/temp/eruptions-ecdf.png) qqnorm (faithful$eruptions)
Q-Q plot, as suggested by christopheraden (http://jean-francois.im/temp/eruptions-qq.png)by leot on 4/12/13, 5:49 AM
by dude_abides on 4/12/13, 6:13 AM
plot(density(Annie), col="red")
lines(density(Brian), col="blue")
lines(density(Chris), col="green")
lines(density(Zoe), col="cyan")
This is the plot you get: http://i.imgur.com/sY2awX7.pngby tantalor on 4/12/13, 4:37 AM
by christopheraden on 4/12/13, 5:43 AM
by radarsat1 on 4/12/13, 9:38 AM