When I graph a density plot in R, and all the numbers are slightly greater than 0, I get essentially a vertical line at x = 0. But when all the numbers are exactly equal to 0, I get some sort of bell curve. Why is that? It seems counterintuitive.
The command I used to plot the curves was
for (i in 0:60) {
cur_data = subset(data, time == i)
p <- ggplot(cur_data, aes(x=error)) +
geom_density() +
theme_bw() +
xlab(paste("Error distribution (minute ", i, ")", sep="")) +
xlim(0, 1)
ggsave(...)
}
At i = 60, cur_data should be entirely populated by the values 0.0.


(Originally posted on Stack Overflow; was told to post here.)