#activate the package library(ggplot2) #load the dataframe ID <- 1:200 values <- rnorm(200, mean=65, sd=15) my.dataframe <- data.frame(ID, values) #combined chart with ggplot() ggplot(my.dataframe, aes(x = values)) + geom_histogram(aes(y = ..density..), binwidth = 5, fill = "grey") + geom_density(alpha = .2) #combined chart w/colors with ggplot() ggplot(my.dataframe, aes(x = values)) + geom_histogram(aes(y = ..density..), binwidth = 5, colour= "black", fill = "white") + geom_density(fill="red", alpha = .2) #combined chart with ggplot() qplot(values, data = my.dataframe, binwidth = 5, geom = "histogram", y = ..density.., fill = I("grey")) + stat_density(geom = "line", fill="red", alpha=.5)