It appears that the plotting heuristics get very confused when histogramming Cauchy random variates. The problem appears to be that Geom.histogram tries to use information about the sample mean and variance, whereas the population moments of Cauchy are indefinite.
using Distributions
v = rand(Cauchy(0, 1), 10^6)
plot(x=v, Geom.histogram, Guide.title("μ = $(mean(v)), σ = $(std(v))"))
Plotting the [normalized] histogram computed with Base.hist yields much nicer results:
Obviously this is an unfair comparison, but I suppose the real question is whether it's worth drawing a histogram that captures 100% of the density all the time.
It appears that the plotting heuristics get very confused when histogramming Cauchy random variates. The problem appears to be that
Geom.histogram
tries to use information about the sample mean and variance, whereas the population moments of Cauchy are indefinite.Plotting the [normalized] histogram computed with
Base.hist
yields much nicer results:I have to ask if it's worth maintaining your own histogramming code in Gadfly instead of just using
Base.hist
.