computing inter-patch distance and plotting as a function of sigma and nconns