added ratio over all bins
honor input xrange, yrange