I\'m using ggplot as described here
ggplot
Smoothed density estimates
and entered in the R console
m <- ggplot(movies, aes(x = rating))
Another way would be to calculate the density separately and then draw it. Something like this:
a <- density(movies$rating) b <- data.frame(a$x, a$y) ggplot(b, aes(x=a.x, y=a.y)) + geom_line()
It's not exactly the same, but pretty close.