geom_histogram() code example Example: geom_histogram r ggplot(diamonds, aes(x = price)) + geom_histogram(binwidth = 1000)