attempt to fix issue #1: modify plotting orders measure_distances.R to stop plot.new not called error