I have a simple table:
# A tibble: 6 × 2
weekday total_cal
<chr> <dbl>
1 Friday 2220.
2 Monday 2104.
3 Saturday 2205.
4 Sunday 2070.
5 Thursday 1930.
6 Tuesday 2152.
After which, I create this bar chart:
calories_weekday_avg %>%
ggplot(aes(x = weekday, y = total_cal))+
geom_bar(stat = "identity", width = 0.75)+
scale_x_discrete(limits = c("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"))
I want the y-axis to start at 1000 instead of 0, so when I add in that code via the scale_y_continous function, it works, but my bars disappear entirely:
calories_weekday_avg %>%
ggplot(aes(x = weekday, y = total_cal))+
geom_bar(stat = "identity", width = 0.75)+
scale_x_discrete(limits = c("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"))+
scale_y_continuous(limits = c(1000, 2300))
Where I am missing something? I've done this before but somehow it worked then.