Modified function “nodeDistanceAnalysis”. Add figure output.