Histograms

using PlotlyJS
function two_hists()
    x0 = randn(500)
    x1 = x0 .+ 1

    trace1 = histogram(x=x0, opacity=0.75)
    trace2 = histogram(x=x1, opacity=0.75)
    data = [trace1, trace2]
    layout = Layout(barmode="overlay")
    plot(data, layout)
end
two_hists()
−3−2−1012301020304050trace 0trace 1