I'm plotting a line chart with ggplot2. I have a dataframe like so
hour total
1 0 4086
2 1 3229
3 2 2134
4 3 1363
5 4 690
6 5 455
This creates my line plot:
ggplot(df, aes(hour, total)) + geom_line(color="#ff0000", size=1.5)
There are only 24 total rows (one for each hour of the day) and I'd like tick marks for every hour. When I plot this it's just 0,5,10,15 and 20:
What do I need to do to get tick marks on the x-axis for each hour?