Implement histogram drawing.