This commit is contained in:
OaCantona 2016-07-24 14:29:49 +02:00 committed by Hadley Wickham
parent ed7348a083
commit 7838cff89c
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ You can compute this by hand by combining `dplyr::count()` and `ggplot2::cut_wid
diamonds %>% count(cut_width(carat, 0.5))
```
A histogram divides the x axis into equally spaced bins and then uses the heigh of bar to display the number observations fall in each bun. In the graph above, the tallest bar shows that almost 30,000 observations have a $carat$ value between 0.25 and 0.75, which are the left and right edges of the bar.
A histogram divides the x axis into equally spaced bins and then uses the height of bar to display the number observations fall in each bun. In the graph above, the tallest bar shows that almost 30,000 observations have a $carat$ value between 0.25 and 0.75, which are the left and right edges of the bar.
You can set the width of the intervals in a histogram with the `binwidth` argument, which is measured in the units of the $x$ variable. You should always explore a variety of binwidths when working with histograms, as different binwidths can reveal different patterns. For example, here is how the graph above looks when we zoom into just the diamonds with a binwidth of less than three and choose a smaller binwidth.