JuliaLang/julia — pull request #6601 by simonbyrne (2014-04-22 13:51:16+00:00)
Title: RFC: add Histogram types

This adds explicit types for histograms. The main advantage is that we can define methods that operate on histograms, notably `plot`. This approach closely mirrors existing functionality, but there are some alternatives that may be worth thinking about:
* Use `hist` to create both 1d and 2d versions: this could be done using tuples (similar to the `kde` function in [KernelDensity.jl](https://github.com/JuliaStats/KernelDensity.jl)).
* Create a general type for an N-dimensional histogram. For example
```
immutable Histogram{N,E,T}
edges::NTuple{N,E}
weights::Array{T,N}
end
```
* Methods for combining multiple histograms (for example, with distributed arrays): we could overload `+` for this?
* Move all this out of Base into [StatsBase.jl](https://github.com/JuliaStats/StatsBase.jl).