plot the relation btw distance and correlation