Set correct range of histogram