Skip to content

Commit 7b09de3

Browse files
accustodiopaleolimbot
authored andcommitted
Improve documentation for geom_histogram(). (#3424, fixes #3269)
* Improving documentation for geom_histogram().
1 parent a46cc6c commit 7b09de3

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

R/geom-histogram.r

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
#'
1313
#' By default, the underlying computation (`stat_bin()`) uses 30 bins;
1414
#' this is not a good default, but the idea is to get you experimenting with
15-
#' different bin widths. You may need to look at a few to uncover the full
16-
#' story behind your data.
15+
#' different number of bins. You can also experiment modifying the `binwidth` with
16+
#' `center` or `boundary` arguments. `binwidth` overrides `bins` so you should do
17+
#' one change at a time. You may need to look at a few options to uncover
18+
#' the full story behind your data.
1719
#'
1820
#' @section Aesthetics:
1921
#' `geom_histogram()` uses the same aesthetics as [geom_bar()];

R/stat-bin.r

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#' @param binwidth The width of the bins. Can be specified as a numeric value
2-
#' or as a function that calculates width from unscaled x. Here, "unscaled x"
3-
#' refers to the original x values in the data, before application of any
2+
#' or as a function that calculates width from unscaled x. Here, "unscaled x"
3+
#' refers to the original x values in the data, before application of any
44
#' scale transformation. When specifying a function along with a grouping
5-
#' structure, the function will be called once per group.
6-
#' The default is to use `bins`
7-
#' bins that cover the range of the data. You should always override
5+
#' structure, the function will be called once per group.
6+
#' The default is to use the number of bins in `bins`,
7+
#' covering the range of the data. You should always override
88
#' this value, exploring multiple widths to find the best to illustrate the
99
#' stories in your data.
1010
#'

man/geom_histogram.Rd

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/stat_summary.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)