The script myHist.jl is as simple as this:
@time a=parse.(Float64,chomp.(readlines()))
using UnicodePlots
@time print(histogram(a),"\n")
and it runs beatifully:
awk '{print $1}' ~/save/mtr_2015/renf90.dat | julia myHist.jl
1.442402 seconds (7.46 M allocations: 402.056 MiB, 19.39% gc time)
┌ ┐
[ 0.0, 500.0) ┤▇▇ 29256
[ 500.0, 1000.0) ┤▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 193081
[1000.0, 1500.0) ┤▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 445996
[1500.0, 2000.0) ┤▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 454985
[2000.0, 2500.0) ┤▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 311294
[2500.0, 3000.0) ┤▇▇▇▇▇▇▇▇▇▇▇▇ 166513
[3000.0, 3500.0) ┤▇▇▇▇▇ 69611
[3500.0, 4000.0) ┤▇▇ 23819
[4000.0, 4500.0) ┤ 6778
[4500.0, 5000.0) ┤ 1721
[5000.0, 5500.0) ┤ 367
[5500.0, 6000.0) ┤ 76
[6000.0, 6500.0) ┤ 13
[6500.0, 7000.0) ┤ 4
[7000.0, 7500.0) ┤ 0
[7500.0, 8000.0) ┤ 1
└
No comments:
Post a Comment