distance graph