# Histogram with ggplot2

#### Yankel

##### Member
Hello all,

I have a simple dataset, and I wish to plot a histogram of the variable "Age". So far simple enough.

I ran this code using ggplot2:

Code:
ggplot(data=Votes, aes(Votes\$Age)) + geom_histogram(breaks=seq(10, 100, by = 10), col="red", fill="blue", alpha = .2) + labs(title="Histogram for Age") + labs(x="Age", y="Number of Voters") + xlim(c(10,100)) + ylim(c(0,40))
And the result is:

Not too bad, but please look at the x-axis...I got 4 numbers there and they make no sense. I chose to have 10 bins:

10-20, 20-30, ...

How do I match the labels, so that I have a label on 10, 20, 30,...100 ?

I looked everywhere and couldn't find it.

Thank you !