Skip to content

Commit

Permalink
change default histogram binning to Scott, closes #214
Browse files Browse the repository at this point in the history
  • Loading branch information
mjskay committed Feb 24, 2024
1 parent c39e8ab commit 8e801e9
Show file tree
Hide file tree
Showing 19 changed files with 29 additions and 27 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Bug fixes:

Minor changes:

* The default histogram bin selection algorithm is now `"Scott"` instead of
`"Sturges"`, as `"Sturges"` tends to be too conservative (#214).
* Several dependency reductions: removed {cowplot}, {purrr}, and {forcats}
from *Suggests*; moved {tidyselect} and {dplyr} from *Imports* to *Suggests*.
The latter two are only strictly necessary for `curve_interval()` due to its
Expand Down
2 changes: 1 addition & 1 deletion R/density.R
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ density_bounded = auto_partial(name = "density_bounded", function(
#' @export
density_histogram = auto_partial(name = "density_histogram", function(
x, weights = NULL,
breaks = "Sturges",
breaks = "Scott",
align = "none",
outline_bars = FALSE,
na.rm = FALSE,
Expand Down
2 changes: 1 addition & 1 deletion R/stat_slabinterval.R
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ StatSlabinterval = ggproto("StatSlabinterval", AbstractStatSlabinterval,
adjust = 1,
trim = TRUE,
expand = FALSE,
breaks = "Sturges",
breaks = "Scott",
align = "none",
outline_bars = FALSE,

Expand Down
2 changes: 1 addition & 1 deletion R/weighted_hist.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#' @importFrom rlang as_label enexpr get_expr
weighted_hist = function(
x, weights = NULL, breaks = "Sturges", align = "none"
x, weights = NULL, breaks = "Scott", align = "none"
) {
x_label = as_label(enexpr(x))
weights_label = as_label(enexpr(weights))
Expand Down
2 changes: 1 addition & 1 deletion man/density_histogram.Rd

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

2 changes: 1 addition & 1 deletion man/stat_ccdfinterval.Rd

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

2 changes: 1 addition & 1 deletion man/stat_cdfinterval.Rd

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

2 changes: 1 addition & 1 deletion man/stat_eye.Rd

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

2 changes: 1 addition & 1 deletion man/stat_gradientinterval.Rd

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

2 changes: 1 addition & 1 deletion man/stat_halfeye.Rd

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

2 changes: 1 addition & 1 deletion man/stat_histinterval.Rd

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

2 changes: 1 addition & 1 deletion man/stat_slab.Rd

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

2 changes: 1 addition & 1 deletion man/stat_slabinterval.Rd

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

2 changes: 1 addition & 1 deletion man/stat_spike.Rd

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

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8e801e9

Please sign in to comment.