#activate the package library(ggplot2) #load the dataframe ID <- 1:200 values <- rnorm(200, mean=65, sd=15) my.dataframe <- data.frame(ID, values) #simple histogram with ggplot() ggplot(my.dataframe, aes(values)) + geom_histogram() #same histogram but with 60 bins ggplot(my.dataframe, aes(values)) + geom_histogram(bins= 60) #same histogram but with binwidth=10 ggplot(my.dataframe, aes(values)) + geom_histogram(binwidth= 10)