Script to generate a histogram