Drawing of the histogram implemented

There are a lot of bugs. I need to fix them :D