Skip to content

Commit 248be73

Browse files
authored
Added description of scale_x_binned to geom_histogram (#3773)
1 parent 13cb186 commit 248be73

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

R/geom-histogram.r

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
#' one change at a time. You may need to look at a few options to uncover
1818
#' the full story behind your data.
1919
#'
20+
#' In addition to `geom_histogram`, you can create a histogram plot by using
21+
#' `scale_x_binned()` with [geom_bar()]. This method by default plots tick marks
22+
#' in between each bar. .
23+
#'
2024
#' @eval rd_orientation()
2125
#'
2226
#' @section Aesthetics:
@@ -39,6 +43,12 @@
3943
#' ggplot(diamonds, aes(y = carat)) +
4044
#' geom_histogram()
4145
#'
46+
#' # For histograms with tick marks between each bin, use `geom_bar` with
47+
#' # `scale_x_binned`.
48+
#' ggplot(diamonds, aes(carat)) +
49+
#' geom_bar() +
50+
#' scale_x_binned()
51+
#'
4252
#' # Rather than stacking histograms, it's easier to compare frequency
4353
#' # polygons
4454
#' ggplot(diamonds, aes(price, fill = cut)) +

man/geom_histogram.Rd

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

0 commit comments

Comments
 (0)