From 62694e4a9382e5efab387bf86e86f7a3c1e4ac63 Mon Sep 17 00:00:00 2001 From: "Michael K. Borregaard" Date: Thu, 31 Aug 2017 23:19:00 +0200 Subject: [PATCH] Make Freedman-Diaconis the default --- src/recipes.jl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/recipes.jl b/src/recipes.jl index 393bc2d4..0708667f 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -510,8 +510,10 @@ function _auto_binning_nbins{N}(vs::NTuple{N,AbstractVector}, dim::Integer; mode v = vs[dim] if mode == :auto - 30 - elseif mode == :sqrt # Square-root choice + mode == :fd + end + + if mode == :sqrt # Square-root choice _cl(sqrt(n)) elseif mode == :sturges # Sturges' formula _cl(log2(n)) + 1 @@ -550,7 +552,7 @@ end @recipe function f(::Type{Val{:histogram}}, x, y, z) - seriestype := :barhist + seriestype := length(y) > 1e6 ? :stephist : :barhist () end @deps histogram barhist