Construction of a histogram and frequency polygon