Made changes to error plotting function(adam email

This is just so that the first 30 distances are plotted in the average