Make Freedman-Diaconis the default

This commit is contained in:
Michael K. Borregaard 2017-08-31 23:19:00 +02:00
parent e92fbadc3a
commit 62694e4a93

View File

@ -510,8 +510,10 @@ function _auto_binning_nbins{N}(vs::NTuple{N,AbstractVector}, dim::Integer; mode
v = vs[dim] v = vs[dim]
if mode == :auto if mode == :auto
30 mode == :fd
elseif mode == :sqrt # Square-root choice end
if mode == :sqrt # Square-root choice
_cl(sqrt(n)) _cl(sqrt(n))
elseif mode == :sturges # Sturges' formula elseif mode == :sturges # Sturges' formula
_cl(log2(n)) + 1 _cl(log2(n)) + 1
@ -550,7 +552,7 @@ end
@recipe function f(::Type{Val{:histogram}}, x, y, z) @recipe function f(::Type{Val{:histogram}}, x, y, z)
seriestype := :barhist seriestype := length(y) > 1e6 ? :stephist : :barhist
() ()
end end
@deps histogram barhist @deps histogram barhist