Improve the way in which histogram bin ranges are chosen