Finished code, more accurate plots between .1 and 1 km