Exercise 18. Histogram binwidth
Note that when we run the code from the previous exercise we get the following warning:
stat_bin() using bins = 30. Pick better value with binwidth.
This exercise is part of the course
Data Science Visualization - Module 2
Exercise instructions
Use the binwidth
argument to change the histogram made in the previous exercise to use bins of size 1 inch.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
p <- heights %>%
ggplot(aes(height))
## add the geom_histogram layer but with the requested argument