x <- rnorm(1000) hist(x, freq = FALSE, col = "grey") curve(dnorm, col = 2, add = TRUE)
This thread (specifically the Ted Harding answer) from the r-help-list augments the usefulness of this simple tip.
This kind of plots cab be easily produced using the lessR package.
For example, from ?color.density:
library(lessR) # generate 100 random normal data values y <- rnorm(100) # normal curve and general density curves superimposed over histogram # all defaults color.density(y)