When plotting rootpy histograms with matplotlib, it usually works fine and the full data range is displayed. However, if the log scale is chosen, it often fails to show all the bins if the values are very small. This is the reason we only saw the first bin in log(d_i) plot — the rest weren't zeros, just tiny (order of ~10^-10). This is how I fixed it in k_value_determination script:
```
value_range = sorted( list( d_i.y() ) )
for i, value in enumerate(value_range):
   if value == 0:
      del value_range[i]
axes.set_ylim( ymin = min(value_range)/10 )
```