We could consider taking the discussion in a Plots issue?
Anyway, until a new keyword is in place, the easiest approach is either to use @stevengj 's PyPlot method or to do a Plots workaround, either
- by fitting a StatsBase histogram, modifying the
weights
field and passing toplot
(there is a recipe for that) - plotting the histogram as normal and specifying different
yticks
or - doing something hacky with modifying the plot object:
function prophist(x; kw...)
s = length(x)
h = histogram(x; kw...)
h[1][1][:y] ./= s
h[1][:yaxis].d[:extrema].emax /= s #also change the ylimits
h
end
prophist(randn(10000), bins = :scott)