Maximum entropy histograms