Skip to content

Commit

Permalink
add breaks_quantiles to example in breaks docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mjskay committed Mar 6, 2024
1 parent b2df6d1 commit 7d6d2d2
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
9 changes: 8 additions & 1 deletion R/weighted_hist.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ weighted_hist = function(
#' library(ggplot2)
#'
#' set.seed(1234)
#' x = rnorm(200, 1, 2)
#' x = rnorm(2000, 1, 2)
#'
#' # Let's compare the different break-selection algorithms on this data:
#' ggplot(data.frame(x), aes(x)) +
Expand Down Expand Up @@ -115,6 +115,13 @@ weighted_hist = function(
#' outline_bars = TRUE,
#' color = "black",
#' ) +
#' stat_slab(
#' aes(y = "breaks_quantiles()\nor 'quantiles'"),
#' density = "histogram",
#' breaks = "quantiles",
#' outline_bars = TRUE,
#' color = "black",
#' ) +
#' geom_point(aes(y = 0.7), alpha = 0.5) +
#' labs(
#' subtitle = "ggdist::stat_slab(density = 'histogram', ...)",
Expand Down
Binary file modified docs/reference/breaks-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 11 additions & 2 deletions docs/reference/breaks.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion man/breaks.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7d6d2d2

Please sign in to comment.