changed plot_link_lengths.py to output histograms