hist : determine number of bins, range and normalize it