Implemented histogram-drawing output.