Are there any good general techniques for binning/histogramming arbitrary data?
I don't know if this what you want but here is a way to calculate the number of bins.


Count the number of data points in your dataset.
Take the square root of the number of data points and round up to determine the initial number of bins required: $InitialNumberOfBins = \sqrt{NumberOfDataPoints}$.
Divide the specification tolerance $Max-Min\ value$ by initial number of bins: $FinalNumberOfBins = (Max-Min\ value) / InitialNumberOfBins$.